A single document update in ES is ACID but is the cache updated when the document is updated? I am doing filter queries and I think that even though I maybe able to update a document safely in a distributed environment, the cache would still show old value for sometime. So, is the cache eventually consistent?
Caches are invalidated when a segment changes.
If you update a doc you change the original segment, hence invalidating that cache, and then update the new segment which will then have a new cache created.
Thank you so much for your reply. But would the new cache creation be eventually consistent? Can it happen that my filter query still gives old results for sometime?
Elasticsearch is not ACID. When you index or update a document it goes onto the transaction log. Periodically this is turned into segments, at which point the document is available for search.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.