Skip to content

Inconsistent results of facets running with a nested query scope #2398

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

Closed
imotov opened this issue Nov 11, 2012 · 1 comment
Closed

Inconsistent results of facets running with a nested query scope #2398

imotov opened this issue Nov 11, 2012 · 1 comment

Comments

@imotov
Copy link
Contributor

imotov commented Nov 11, 2012

When a nested query is combined with a parent query and a facet is executed against the nested query scope, the facet results depend on the order of execution of nested and parent queries. For example, if a bool query has two must clauses and the nested query is the first clause, the nested facets are filtered by the parents query in the last clause. If the nested query is the last clause, the nested facet runs against all nested document ignoring the parent query in the first clause. Example: https://gist.github.com/c505e3ce1f535d700f37

@martijnvg
Copy link
Member

This issue is fixed by the removal of _scope in #2606

I updated your gist to demonstrate how to facet by nested facets with the use of _scope:
https://gist.github.com/martijnvg/4721628

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

No branches or pull requests

2 participants