Add rest_total_hits_as_int in HLRC's search requests#46076
Add rest_total_hits_as_int in HLRC's search requests#46076jimczi merged 1 commit intoelastic:6.8from
Conversation
This commit adds a query parameter called rest_total_hits_as_int to all HLRC's search requests that support it (_search, _msearch, ...). This makes the HLRC client's search compatible with any node in version >= 6.8.0. Closes elastic#43925
|
Pinging @elastic/es-core-features |
javanna
left a comment
There was a problem hiding this comment.
I believe that this parameter is not supported by previous 6.x versions, which makes the change good to talk to 7.x (very important), but bad to talk to previous 6.x version. This is not so important though as we document that the client is forward compatible, and that there may be problems communicating with nodes on previous minor, even if on the same major (https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-compatibility.html) . I don't see a way to work around this given that we don't know the version of the nodes that we talk to. Should we add a note around the fact that this change may break users somewhere?
|
We discussed offline with @javanna, the change is not a breaking one since HLRC is forward compatible and warns against client talking to nodes in previous versions (minor or major). |
This commit adds a query parameter called
rest_total_hits_as_intto all HLRC's search requeststhat support it (_search, _msearch, ...). This makes the HLRC client's search compatible with any node in version >= 6.6.0 since
rest_total_hits_as_inthas been added in 6.6.0. This means that nodes in version < 6.6.0 won't be able to handle search requests sent by an HLRC in version 6.8.3 but we already warn in the docs that the client is forward compatible only:https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-compatibility.html
Closes #43925