We have the below query that returns 15K results.
How do we paginate through all the results
From the examples for search_after , it can be used only if we are sorting by a unique field in the query . We do not intend to use any sort in the query
{
"_source": [
"Id",
"EntityName"
],
"size": 100,
"query": {
"bool": {
"should": [
{
"multi_match": {
"_name": "Exact Match",
"type": "phrase",
"query": "Alibaba Group Holding Limited",
"fields": [
"EntityName.keyword"
],
"boost": 4
}
},
{
"multi_match": {
"_name": "Partial Match",
"type": "phrase",
"query": "Alibaba Group",
"fields": [
"EntityName"
],
"boost": 2
}
},
{
"multi_match": {
"_name": "Partial Match variation",
"type": "phrase",
"query": "Alibabas Group",
"fields": [
"EntityName"
],
"boost": 2
}
}
],
"minimum_should_match": 1
}
}
}
Thanks,
Sandeep