Can I know that inserted data is consistent for all shards / nodes?


(Genady Mironenko) #1

I want to make aggregations over inserted in Elasticsearch data but it means that inserted data should be consistent for all shards. Can I ensure consistency of inserted data or to know that data that was stored in ES become consistent? I don't need to make aggregations just after insertion and can wait for few minutes.


(David Turner) #2

A refresh returns (successfully) once all previously-written data is exposed on all shards. You can either do this explicitly as a separate step or else include it with the indexing operation itself.