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
I notice an inconsistency to the responses between the java client and the actual OpenSearch response when I try to update by query.
When executing an update_by_query request using the Java client, the returned ByQueryResponse object reports an updated count of 0. However the OpenSearch response for the same query returns an updated count of 1.
So the problem is that the java client returns updated = 0 but OpenSearch returns updated = 1 although we run the same query using the same method (update by query).
What is the expected behavior?
The query response should be the same between OpenSearch and the java client.
What is your host/environment?
java version 17
spring-data-opensearch-starter version 1.5.4 (excluding opensearch-rest-high-level-client)
opensearch-java version 2.18.0
Do you have any additional context?
After some investigation, I suspect that the byQueryResponse method in the org.opensearch.data.client.osc.ResponseConverter class might be responsible for the discrepancy. In this method the updated field value of the builder is never set. Although the rest of the fields( eg total, deleted, etc) are set as expected.
Shouldn't it also include the updated field?
The text was updated successfully, but these errors were encountered:
What is the bug?
I notice an inconsistency to the responses between the java client and the actual OpenSearch response when I try to update by query.
When executing an update_by_query request using the Java client, the returned ByQueryResponse object reports an updated count of 0. However the OpenSearch response for the same query returns an updated count of 1.
More specifically, the OpenSearch response:
And the java client response:
So the problem is that the java client returns
updated = 0
but OpenSearch returnsupdated = 1
although we run the same query using the same method (update by query).What is the expected behavior?
The query response should be the same between OpenSearch and the java client.
What is your host/environment?
Do you have any additional context?
After some investigation, I suspect that the
byQueryResponse
method in theorg.opensearch.data.client.osc.ResponseConverter
class might be responsible for the discrepancy. In this method theupdated
field value of the builder is never set. Although the rest of the fields( eg total, deleted, etc) are set as expected.Shouldn't it also include the
updated
field?The text was updated successfully, but these errors were encountered: