Eventual consistency on simple document put/get

Hello!

Let's imagine elasticsearch as a simple object key-value store and ignore all search/indexing functionality.

When I create/update a document, is it instantly (not eventually) available for all clients when they try to retrive it with simple "GET"?

I want to store users shopping cart in elasticsearch for fast retrieval, I still use DBMS but I want use elasticsearch as a view cache. I couldn't be sure if elasticsearch will lag because of its "eventual consistent" nature in that workflow.

Thank you in advance

Yes, retrieving the document by key through a GET request will return the document even if it has not been flushed and made available through search.

1 Like

thank you! can you point me to a documentation regarding the issue?

Here is one place it's mentioned: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html#realtime

1 Like

Thank you!