Why the documents are fetched from primary shard and replica shard when I run the same query again and again. Because of this I am getting different search results.
Example response - 1 - Replica "_shard": 0, "_node": "node_1", "_index": "sample_ind", "_type": "my_type", "_id": "E1", "_score": 2.9560382,
Response-2 Primary shard
"_shard": 0,
"_node": "node_2",
"_index": "sample_ind",
"_type": "my_type",
"_id": "E2",
"_score": 2.956294,
node-1 has the replica shard and node-2 has the primary shard. How the query fetch works and why the response comes from primary shard and replica shard when i run the same query multiple time ?