Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Aug 28, 2019

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.6.0 since rest_total_hits_as_int has 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

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
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@jimczi
Copy link
Contributor Author

jimczi commented Aug 29, 2019

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants