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.
- I have a property called
foo
. - Then I introduced a new property called
bar
. - Then I updated all the documents where
foo
had the valuex
toy
and updatedbar
to have the valuex
.
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.