-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fix _field_caps
serialization in order to support cross cluster search
#24722
Conversation
Today the `_field_caps` API doesn't implement its request serialization correctly since indices and indices options are not serialized at all. This will likely break with all transport clients etc. and if this request must be send across the network. This commit fixes this and adds correct handling if we have only remote indices to prevent the inclusion of all local indices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM should we also add a unit test for the field caps request serialization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can you also add the missing fields in FieldCapabilitiesRequestTests.
Works will with elastic/kibana#11114 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for adding the tests
|
||
// change indices options | ||
other.indicesOptions(IndicesOptions.strictExpand()); | ||
assertNotEquals(request, other); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you can use EqualsHashCodeTestUtils#checkEqualsAndHashCode and save yourself some boilerplate here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still LGTM thanks @s1monw left a tiny comment but it doesn't need another review and it can also be addressed later if applicable
…rch (#24722) Today the `_field_caps` API doesn't implement its request serialization correctly since indices and indices options are not serialized at all. This will likely break with all transport clients etc. and if this request must be send across the network. This commit fixes this and adds correct handling if we have only remote indices to prevent the inclusion of all local indices.
Today the
_field_caps
API doesn't implement its request serializationcorrectly since indices and indices options are not serialized at all.
This will likely break with all transport clients etc. and if this request
must be send across the network. This commit fixes this and adds correct
handling if we have only remote indices to prevent the inclusion of
all local indices.