Differnt shards giving different results

Hi,
I am using Elasticsearch version 7.1.1.
My index and cluster settings are as follows.
Index Settings:
number_of_shards: 1
number_of_replicas: 2
Cluster structure:
Master nodes: 3
Data nodes:3
Coordinating node:2

For same query, i am getting getting different results.One shards gives a match and other 2 shards give no match.

My Observations:
Out of 3 shards only 1 shard gives the result for query.Other 2 shards give no match however that document is present on each shard.

Number of documents and size is same for each shard.

/_cat/shards
    index            shard prirep    state     docs  store   ip            node
    index-0             0     p      STARTED  541384 1.8gb 172.29.236.74 es-data-01
    index-0             0     r      STARTED  541384 1.8gb 172.29.236.75 es-data-02
    index-0             0     r      STARTED  541384 1.8gb 172.29.236.56 es-data-03

Can someone please explain this behaviour or is it a known bug?

Does the inconsistency persist even after stopping all indexing and running POST /index-0/_refresh?

Thanks for your quick response.
Yes ,Indexing was stopped.I refreshed index manually.I observed the same behaviour.
Then i restarted whole cluster but issue still persists.

What is the search you're doing?

Its a multi clause query which consists of following clauses.
1 nested clause.
1 termset query.
4 match queries.

Or you want exact query?

Yes, the exact query would help.

Do you get different results when searching for a specific document: either an ids query or a terms query matching _id, preferably both? What about if you try and GET that document?

This very closely-related question seems to be due to inconsistent synonyms on the nodes, or synonyms that changed over time:

Does that apply in your case too?

1 Like

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