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

Pc min should match #6095

Closed
wants to merge 30 commits into from
Closed

Pc min should match #6095

wants to merge 30 commits into from

Conversation

clintongormley
Copy link

Adds a minimum_children parameter to the has_child query and filter.

  • For the query with score_mode: sum|avg|max, it was possible to support this directly in ChildrenQuery.
  • For the filter and the query with score_mode: none, I added CountChildrenConstantScoreQuery as it seemed a cleaner solution than trying to make either ChildrenQuery or ChildrenConstantScoreQuery fit

YAML tests have been added, but not sure what to do the Java tests. Also still needs docs.

Closes #6019

@@ -0,0 +1,274 @@
---
Copy link
Member

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)

@dakrone
Copy link
Member

dakrone commented May 19, 2014

@clintongormley can we add a maximum_children parameter as well?

@clintongormley
Copy link
Author

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

@clintongormley
Copy link
Author

This PR now includes max_children, tests and docs and is ready for review.

@martijnvg martijnvg self-assigned this May 30, 2014
}

/**
* Defines the minimum number of children that are required to match for the parent to be considered a match.
Copy link
Member

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.

@martijnvg
Copy link
Member

Lets get this in! LGTM!

@javanna
Copy link
Member

javanna commented Jun 3, 2014

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.

@clintongormley
Copy link
Author

Closed by #6019

@clintongormley clintongormley deleted the pc_min_should_match branch June 6, 2014 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support min_children and max_children on has_child query/filter
4 participants