Skip to content
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

Add the ability to define custom inner hit sub context builder #24676

Merged
merged 3 commits into from
May 23, 2017

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented May 15, 2017

This commit moves the handling of nested and parent/child inner hits to specialized classes that can be defined outside of ES core.
InnerHitBuilderContext is now used by the parent query (nested or hasChild, ...) to build the sub context from the InnerHitBuilder definition.
BWC is also ensured so that nodes in previous versions can still send/receive inner hits to/from this version.`

Relates #20257

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Looks good!

Would be great to have bwc serialization tests in NestedQueryBuilderTests, HasChildQueryBuilderTests and HasParentQueryBuilderTests. Right now these tests do test serialization, but only with the current version. We should also test that these query builders parse 5.x serialization format correctly.

}

private String name;
private String nestedPath;
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for moving this to InnerHitContextBuilder and its subclasses!

@jimczi
Copy link
Contributor Author

jimczi commented May 19, 2017

Thanks @martijnvg
I pushed another commit which adds BWC tests for the (de)serializations.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

This commit moves the handling of nested and parent/child inner hits to specialized classes that can be defined outside of ES core.
InnerHitBuilderContext is now used by the parent query (nested or hasChild, ...) to build the sub context from the InnerHitBuilder definition.
BWC is also ensured so that nodes in previous versions can still send/receive inner hits to/from this version.`

Relates elastic#20257
@jimczi jimczi merged commit 9087803 into elastic:master May 23, 2017
@jimczi jimczi deleted the inner_hits_refactoring branch May 23, 2017 11:06
jimczi added a commit that referenced this pull request May 23, 2017
This commit moves the handling of nested and parent/child inner hits to specialized classes that can be defined outside of ES core.
InnerHitBuilderContext is now used by the parent query (nested or hasChild, ...) to build the sub context from the InnerHitBuilder definition.
BWC is also ensured so that nodes in previous versions can still send/receive inner hits to/from this version.

Relates #20257
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Inner Hits labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search/Search Search-related issues that do not fall into other categories v5.5.0 v6.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants