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
Pc min should match #6095
Pc min should match #6095
Conversation
@@ -0,0 +1,274 @@ | |||
--- |
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.
I think most of these tests should be Java tests? (in SimpleChildQuerySearchTests)
@clintongormley can we add a |
@dakrone Yeah, I was thinking the same thing. Btw, this PR hasn't stalled - I want to sit down with @martijnvg after 1.2 and see what to do about refactoring. |
This PR now includes |
} | ||
|
||
/** | ||
* Defines the minimum number of children that are required to match for the parent to be considered a match. |
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.
This has the same jdocs as minChildren.
ChildrenConstantScoreQuery and ChildrenQuery. Intended only for has_child filter or has_child queries without scoring when minimum_children > 1 is specified.
to support both scoring and counting and the combination
…ndividual classes
… purposes In practice, the HasChild query/filter uses ChildrenConstantScoreQuery instead
Lets get this in! LGTM! |
I think we can close this one right @clintongormley ? Also the labels are already on the related issue, we might want to remove them from the PR. |
Closed by #6019 |
Adds a
minimum_children
parameter to thehas_child
query and filter.score_mode: sum|avg|max
, it was possible to support this directly in ChildrenQuery.score_mode: none
, I added CountChildrenConstantScoreQuery as it seemed a cleaner solution than trying to make either ChildrenQuery or ChildrenConstantScoreQuery fitYAML tests have been added, but not sure what to do the Java tests. Also still needs docs.
Closes #6019