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

Nested aggregation collects docs out-of-order #9547

Closed
jpountz opened this issue Feb 3, 2015 · 0 comments
Closed

Nested aggregation collects docs out-of-order #9547

jpountz opened this issue Feb 3, 2015 · 0 comments

Comments

@jpountz
Copy link
Contributor

jpountz commented Feb 3, 2015

This issue is easier to explain with an example: let's imagine that doc ID 0 and 1 are nested documents of doc ID 2. If the parent collector calls the nested aggregator with doc ID 2 and buckets 0 and 1 then the nested aggregator will call its sub aggregators with the following docID, bucketOrd tuples:

  • docID= 0, bucket=0
  • docID=1, bucket=0
  • docID=0, bucket=1
  • docID=1, bucket=1

I think we should either buffer all collected buckets per doc ID or change the nested aggregator to have a different sub aggregator instance per bucket?

jpountz added a commit to jpountz/elasticsearch that referenced this issue Feb 3, 2015
@jpountz jpountz closed this as completed in 13b64cc Feb 3, 2015
@clintongormley clintongormley changed the title Aggs: nested aggregation collects docs out-of-order Nested aggregation collects docs out-of-order Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant