Understand async and wait_for mode

Hi,

A question about the async mode (when I don't specify the option 'refresh=wait_for') and when I specify.
Qeustion: in the same index I have 2 documents: 'A' and 'B'.
If I update the document 'A' with no refresh option and just after, in the same thread(java), I update the document 'B' with the option 'refresh=wait_for', when I have the update response for B, Can I consider that the 'index process' for document 'A' is also finished ? (We expect the fact that an error can occurs for the document 'A')

It depends. ?refresh=wait_for ensures that all successfully-completed writes to affected shards are now visible, but there's no guarantee that document A is in one of those shards.

Ok understood, it makes sense.
Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.