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

Parent / child queries should also work apis other than search api #3822

Closed
martijnvg opened this Issue Oct 2, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@martijnvg
Copy link
Member

martijnvg commented Oct 2, 2013

The has_child, has_parent and top_children now only work in the search api due to how this api executed these queries. These queries should also work in other apis, like count, explain and delete by query apis.

@ghost ghost assigned martijnvg Oct 2, 2013

@s1monw

This comment has been minimized.

Copy link
Contributor

s1monw commented Oct 2, 2013

huge +1 ;)

@mattweber

This comment has been minimized.

Copy link
Contributor

mattweber commented Oct 2, 2013

+1, also good for #2705 and #1566?

@martijnvg

This comment has been minimized.

Copy link
Member Author

martijnvg commented Oct 4, 2013

@mattweber Good that you pointed this out. With the new design this is possible, I made some minor changes and seems to work out, so yes :)

martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Oct 8, 2013

Support the `has_child`, `has_parent`, `top_children` queries (and fi…
…lters) in other apis than just search api. The queries are also now supported in count, explain (return dummy explination) and delete by query apis.

Migrate SearchContext.Rewrite to Releasable. All the parent child queries are now implemented as Lucene queries and the state is kept in the Weight.
Completely disable caching for `has_child` and `has_parent` filters, this has never worked and it also can also never work. The matching docIds are cached per segment while the collection of parent ids is top level.

Closes elastic#3822

@martijnvg martijnvg closed this in 1f117c1 Oct 9, 2013

martijnvg added a commit that referenced this issue Oct 9, 2013

Support the `has_child`, `has_parent`, `top_children` queries (and fi…
…lters) in other apis than just search api. The queries are also now supported in count, explain (return dummy explination) and delete by query apis.

Migrate SearchContext.Rewrite to Releasable. All the parent child queries are now implemented as Lucene queries and the state is kept in the Weight.
Completely disable caching for `has_child` and `has_parent` filters, this has never worked and it also can also never work. The matching docIds are cached per segment while the collection of parent ids is top level.

Closes #3822

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Support the `has_child`, `has_parent`, `top_children` queries (and fi…
…lters) in other apis than just search api. The queries are also now supported in count, explain (return dummy explination) and delete by query apis.

Migrate SearchContext.Rewrite to Releasable. All the parent child queries are now implemented as Lucene queries and the state is kept in the Weight.
Completely disable caching for `has_child` and `has_parent` filters, this has never worked and it also can also never work. The matching docIds are cached per segment while the collection of parent ids is top level.

Closes elastic#3822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.