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

Aggregations: ReverseNestedAggregator does not compute parent documents correctly #6278

Closed
jpountz opened this issue May 22, 2014 · 0 comments

Comments

@jpountz
Copy link
Contributor

jpountz commented May 22, 2014

In order to compute parent documents based on a child document, ReverseNestedAggregator does the following:

int parentDoc = parentDocs.advance(childDoc);

But the behavior of advance is undefined when the target is less than or equal to the target document, which can happen if you have 2 matching child documents that have the same parent.

This works fine in most cases when the filter cache is enabled since FixedBitSet is permissive and would go the the next set bit after childDoc. But if the filter cache is disabled then you might run into trouble.

@jpountz jpountz self-assigned this May 22, 2014
@jpountz jpountz added bug and removed v1.1.3 labels May 22, 2014
jpountz added a commit to jpountz/elasticsearch that referenced this issue May 22, 2014
jpountz added a commit that referenced this issue May 22, 2014
jpountz added a commit that referenced this issue May 22, 2014
@jpountz jpountz changed the title ReverseNestedAggregator does not compute parent documents correctly Aggregations: ReverseNestedAggregator does not compute parent documents correctly May 30, 2014
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant