-
Notifications
You must be signed in to change notification settings - Fork 187
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
[BUG] SearchAfter only allows List<Strings> as type. #755
Comments
What does the API spec say about this field? Is it supposed to accept a non-String type? https://github.com/opensearch-project/opensearch-api-specification may need to be modified. |
Opensearch documentation states that the
|
Thanks. If you have time, write a test that doesn't compile and maybe see if it's easy to fix? |
close this issue? This issue has been resolved. However, since it is not backward compatible, it will be applied to version 3.x. |
What is the bug?
_OpenSearch search request
search_after
must accept any type of variables, in order to be able to paginate using the search_after feature.The type defined in
SearchRequest.java
only acceptsList<String>
. This prevents any other non-String sort value from a previous query to be used in the proper type, causing the search query to fail.The SearchResponse also casts any value from the hits.sort() to String.
How can one reproduce the bug?
sort
value on a field that is not of type String.sort
value of your last hitsearchAfter
key with value of the List collected in step 2.String
. Try calling the query and notice how the shards will fail, returning 0 hits.What is the expected behavior?
Expected behaviour is for the
sort
value to be in the original type, and forSearchAfter
to be capable of being of that Type.What is your host/environment?
AOSS
Do you have any screenshots?
No, but you can see here
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: