alexanoid
alexanoid

Reputation: 25842

ElasticSearch create/update certain index documents with strong consistency

Is it possible to create/update certain ES index documents with strong consistency instead of eventual consistency ? If so, please show an example.

Upvotes: 0

Views: 356

Answers (1)

Michael Stockerl
Michael Stockerl

Reputation: 749

You can set the required write consistency for each single index request.

If you want data written to every replica before returning to the user, you just have to add

"consistency": "all" 

to your index operation.

Upvotes: 3

Related Questions