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

Make 0 as invalid value for min_children in has_child query #32949

Closed
mayya-sharipova opened this issue Aug 17, 2018 · 11 comments
Closed

Make 0 as invalid value for min_children in has_child query #32949

mayya-sharipova opened this issue Aug 17, 2018 · 11 comments
Labels
>enhancement good first issue low hanging fruit :Search/Search Search-related issues that do not fall into other categories

Comments

@mayya-sharipova
Copy link
Contributor

0 for min_children option in has_child query doesn't make sense, because:

  1. It is ambiguous. Does it mean to match only parents that either have children matching the specified constraints or no have no children at all.
  2. It currently behaves as a value of 1, that is if there is no at least 1 child matching a specified constrained, a parent document is not returned.

For these reasons, we should make 0 value as invalid value.

Related #21224

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@mayya-sharipova mayya-sharipova added the :Search/Search Search-related issues that do not fall into other categories label Aug 17, 2018
@kevinaud
Copy link

I'm interested in working on this

@rajeshggwp
Copy link

Is anyone still working on this? If not can I pick this?

@mayya-sharipova
Copy link
Contributor Author

@rajeshggwp Sorry, we do have an open PR for this: #33073

@shoaib4330
Copy link

shoaib4330 commented Feb 6, 2019

Is someone working on it? The issue is still open, I plan on working on it.

@mayya-sharipova
Copy link
Contributor Author

@shoaib4330 Sorry, we have a stalled PR opened for it. I think we will just finish that PR.

@mayya-sharipova
Copy link
Contributor Author

@shoaib4330 We have closed a stalled PR #33073, because of inactivity! If you still would like to work on this issue, please go ahead.

@shoaib4330
Copy link

shoaib4330 commented Feb 13, 2019

@mayya-sharipova Sure. I'm on it then.

@kutty-kumar
Copy link

@shoaib4330 have u started working on this, if not then i will pick it up.

@codebird
Copy link
Contributor

@mayya-sharipova I am new here, can I take on this issue?

codebird added a commit to codebird/elasticsearch that referenced this issue Apr 18, 2019
…n case min_children is not provided it will be set to 1 by default.
cbuescher pushed a commit that referenced this issue Apr 25, 2019
* squashing multiple commits

* fixing #32949 updated DEFAULT_MIN_CHILDREN to be 1, this way in case min_children is not provided it will be set to 1 by default.

* Fix ChildQuerySearchIT
@cbuescher
Copy link
Member

Closed by #41347

@jimczi jimczi closed this as completed Apr 25, 2019
akhil10x5 pushed a commit to akhil10x5/elasticsearch that referenced this issue May 2, 2019
…tic#41347)

* squashing multiple commits

* fixing elastic#32949 updated DEFAULT_MIN_CHILDREN to be 1, this way in case min_children is not provided it will be set to 1 by default.

* Fix ChildQuerySearchIT
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this issue May 27, 2019
…tic#41347)

* squashing multiple commits

* fixing elastic#32949 updated DEFAULT_MIN_CHILDREN to be 1, this way in case min_children is not provided it will be set to 1 by default.

* Fix ChildQuerySearchIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement good first issue low hanging fruit :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

9 participants