You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing a search from Java Opensearch client by disabling stored fields ("stored_fields: none") fails with an MissingRequiredPropertyException. Even though, the query is executed by the Opensearch server (confirmed through Opensearch console), the Java client cannot process a response with null _id field.
How can one reproduce the bug?
Create a new query with stored_fields as none and opensearch client will throw an error. SearchRequest.Builder searchRequest = new SearchRequest.Builder(); searchRequest.storedFields("_none_"); return searchRequest.build();
Execute the above search request for any filter/query and you can notice that the Java client throws an MissingRequiredPropertyException: Missing Required Property 'Hit.id'
What is the expected behavior?
Since the query with "none" stored fields is executed by opensearch server, the Java client should be able to process it and return the response without throwing an exception.
What is your host/environment?
Opensearch Java - 2.7.0
Do you have any screenshots?
Do you have any additional context?
Searching & Retrieving documents with id field is very slow potentially due to reading the id from stored fields. Executing the search by disabling stored fields (by using "stored_fields: none") makes the search faster. However, the Java client cannot process responses with null Id from Opensearch server.
The text was updated successfully, but these errors were encountered:
What is the bug?
Executing a search from Java Opensearch client by disabling stored fields ("stored_fields: none") fails with an MissingRequiredPropertyException. Even though, the query is executed by the Opensearch server (confirmed through Opensearch console), the Java client cannot process a response with null
_id
field.How can one reproduce the bug?
Create a new query with stored_fields as none and opensearch client will throw an error.
SearchRequest.Builder searchRequest = new SearchRequest.Builder(); searchRequest.storedFields("_none_"); return searchRequest.build();
Execute the above search request for any filter/query and you can notice that the Java client throws an
MissingRequiredPropertyException: Missing Required Property 'Hit.id'
What is the expected behavior?
Since the query with "none" stored fields is executed by opensearch server, the Java client should be able to process it and return the response without throwing an exception.
What is your host/environment?
Opensearch Java - 2.7.0
Do you have any screenshots?
Do you have any additional context?
Searching & Retrieving documents with id field is very slow potentially due to reading the id from stored fields. Executing the search by disabling stored fields (by using "stored_fields: none") makes the search faster. However, the Java client cannot process responses with null Id from Opensearch server.
The text was updated successfully, but these errors were encountered: