Pagination does not work when using sort_by in search query language
When using the following query through the webapp search interface with search query language option enabled: origin: github and sort_by = [-last_visit]
,
the first page of result is correctly displayed but when requesting the next page the following error is returned:
{
"error":{
"root_cause":[
{
"type":"illegal_argument_exception",
"reason":"search_after has 2 value(s) but sort has 3."
}
],
"type":"search_phase_execution_exception",
"reason":"all shards failed",
"phase":"query",
"grouped":true,
"failed_shards":[
{
"shard":0,
"index":"origin-v0.11",
"node":"gz-GX7OwRdqPMWGYVrmXtw",
"reason":{
"type":"illegal_argument_exception",
"reason":"search_after has 2 value(s) but sort has 3."
}
}
],
"caused_by":{
"type":"illegal_argument_exception",
"reason":"search_after has 2 value(s) but sort has 3.",
"caused_by":{
"type":"illegal_argument_exception",
"reason":"search_after has 2 value(s) but sort has 3."
}
}
},
"status":400
}```
----
*Migrated from T4296 ([view on Phabricator](https://forge.softwareheritage.org/T4296))*