-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] searchApi
should support search_after
#476
Comments
I found this Stackoverflow answer for https://stackoverflow.com/questions/62716360/elasticsearch-search-after-with-nodejs |
# GET shakespeare/_search
{
"size": 10,
"query": {
"match": {
"play_name": "Hamlet"
}
},
"search_after": [ 1, "32635"],
"sort": [
{ "speech_number": "asc" },
{ "_id": "asc" }
]
} I see that you mean though. It would be a lot more convenient if you can just pass Anyhow, we're actually have a series of Guides in the work that includes sample code for search, that will hopeful help you avoid this pitfall in the future :) |
Gotcha. Looking at your example, it looks like |
I think this request is more appropriate for the OS cluster repo. The client is just following the API defined by the cluster. |
Is your feature request related to a problem?
The OpenSearch API supports pagination using the
search_after
parameter: https://opensearch.org/docs/2.4/opensearch/search/paginate/#the-search_after-parameterHowever, it seems that
opensearch-js
'ssearchApi
does not support this parameter: https://opensearch-project.github.io/opensearch-js/2.1/API-Search.htmlWhat solution would you like?
searchApi
allows pagination usingsearch_after
.What alternatives have you considered?
Using pagination with
size
andfrom
, but this has serious limitations.The text was updated successfully, but these errors were encountered: