Aggregate contains old values

Hey there,

I'm having some problems with aggregations returning old data. When I query directly using bool/must/term the data is not there - as it should. Only in aggregation results.

  1. I have a property called foo.
  2. Then I introduced a new property called bar.
  3. Then I updated all the documents where foo had the value x to y and updated bar to have the value x.

Querying directly for foo = x yields 0 results, as it should.
Querying directly for bar = x yields 10 results, as it should.

When aggregating foo and bar I receive x in the foo property (with doc_count = 0) and the bar property.
I expect to only see the x values in the bar property.

Elasticsearch version 2.3.5 running in Elastic Cloud.

Note: when I removed the index completely and populated the index again, everthing was working as it should. It only appears to be happening on existing indices.

Is there any logical explanation for this? I'm aware of doc_count being approximate, but I guess that's a completely different thing.

Moved to Elasticsearch topic as this is not a Cloud infrastructure issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.