-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add search_before #29449
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
Comments
This is something you can already achieve with |
It seems when we do the reverse |
FYI, we had the same issue and it was due to missing values being pushed at the end by default, even for "desc" order. {
"sort": { "name" : "asc" }
} becomes: {
"sort": {
"name" : "desc",
"missing": "_first"
}
} |
Reversing the sort order (say from
response1:
response2:
response3:
response4: Now, say I would like to go from the last response (
The response would be: As we can see, the original order of the response which was |
@BinitaBharati You are right. @jimczi any comments? |
Also, the nth item from top is not the same as nth item from the bottom. You need to the proper mapping to handle that. |
Can anyone with elastic comment on to why this was closed? This seems like a legitimate feature request? And with the limitations expressed above, the proposed solution by elastic does not work as users would expect. |
Uh oh!
There was an error while loading. Please reload this page.
From facebook api:
before : This is the cursor that points to the start of the page of data that has been returned.
after : This is the cursor that points to the end of the page of data that has been returned.
We want to implement an API like in facebook, to do so, we need "search_before" functionality as "search_after" https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html
The text was updated successfully, but these errors were encountered: