Inconsistent unacknowledged reads from the same ES node

Hi, community.

Here's the situation I'm struggling with.
Hope you could help me with it.

I have 2 node ES cluster with index that has 2 shards.
The first node is primary for both shards.

To say it simply I send update request with wait_for refresh strategy to elastic search primary host, concurrently sending search request that checks if entity has been updated already to specific state.
Due to read unacknowledged, that is described in docs, I get entity with desired state although update request hasn't been returned yet. After that immediately, during update request still in progress, I send another search request directly to primary shard and get entity in undesired state.

First of all I though if I got entity in desired state all subsequent search requests would be also successful especially if I send them to the same, primary host. Is this true?
Second of all I would like to know how can I resolve this problem.


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