Open hemidactylus opened 4 days ago
@hemidactylus this is a bug we need to fix, do you have an example of what the find was ?
Sure, I just found this is enough even on an empty table and with a made-up pageState:
{
"find": {
"sort": {},
"options": {
"pageState": "x"
}
}
}
Steps to reproduce with a table (not tested,but also happen with collections):
first query, works, gets rows and a next page state
{
"find": {
"sort": {}
}
}
Run second query, with the page state from the first response. Note above has this, but us made up page state.
{
"find": {
"sort": {},
"options": {
"pageState": "FWxlby5tb29yZUBhd2Vzb21lLmFwaQDwf///6wA="
}
}
}
returns error:
{
"errors": [
{
"message": "Request invalid: field 'command.options.pageState' value \"FindCommand[filterClause=null, projectionDefinition=null, sortClause=SortClause[sortExpressions=[]], options=Options[limit=null, skip=null, pageState=FWxlby5tb29yZUBhd2Vzb21lLmFwaQDwf///6wA=, includeSimilarity=false, includeSortVector=false]]\" not valid. Problem: pageState is not supported with sort clause.",
"errorCode": "COMMAND_FIELD_INVALID",
"id": "9a204ed0-2d10-4e19-9f1d-d28a5d2132c3",
"title": "Request invalid",
"family": "REQUEST",
"scope": "EMPTY"
}
]
}
error msg
Request invalid: field 'command.options.pageState' value "FindCommand[filterClause=null, projectionDefinition=null, sortClause=SortClause[sortExpressions=[]], options=Options[limit=null, skip=null, pageState=FWxlby5tb29yZUBhd2Vzb21lLmFwaQDwf///6wA=, includeSimilarity=false, includeSortVector=false]]" not valid. Problem: pageState is not supported with sort clause.
Related to #1735
When running e.g. the second page of a
find
command, thus passing apageState: <string>
to the options, it is sufficient to provide an emptysort: {}
to trigger the following error (the find being otherwise working correctly):