# Inconsistent result set returned for same query

**URL:** <https://discuss.elastic.co/t/inconsistent-result-set-returned-for-same-query/81219>\
**Category:** Elasticsearch\
**Created:** [April 4, 2017, 8:53pm UTC](https://discuss.elastic.co/t/inconsistent-result-set-returned-for-same-query/81219 "2017-04-04T20:53:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashit\_pupu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashit_pupu/32/101113_2.png) [@ashit\_pupu](https://discuss.elastic.co/u/ashit_pupu)\
**Post date:** [April 4, 2017, 8:53pm UTC](https://discuss.elastic.co/t/inconsistent-result-set-returned-for-same-query/81219/1 "2017-04-04T20:53:06Z")

</div>

I am trying to query in Elasticsearch, but time and again I am getting a different result set from elasticsearch for same query. My cluster is having 3 shards and 2 replicas. My first guess was this might be happening because of shards in action there fore I tried querying with dfs\_query\_then\_fetch but still I am having the same issue, after a lot a searching through I found out that the shard to which it is searching on is changing so I used preference to query. Still I observe the same issue. I am out of options now unable to figure out what is the issue. Pasting my query here

> POST \_search?search\_type=dfs\_query\_then\_fetch&preference=metiswayfinder  
> {  
> "query": {  
> "multi\_match" : {  
> "query": "this is a test",  
> "fields": ["subject^3", "message"]  
> }  
> },  
> "sort" : [ {  
> "\_score" : {  
> "order" : "desc"  
> }  
> }, {  
> "incidentcount" : {  
> "order" : "desc"  
> }  
> } ]}

Relevance score is vital for me, also I observe that the score keeps on changing everytime I do a search. Elasticsearch is giving inconsistent result set and inconsistent score. Any way by which I can neutralize these two scenarios without much change.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 2, 2017, 8:53pm UTC](https://discuss.elastic.co/t/inconsistent-result-set-returned-for-same-query/81219/2 "2017-05-02T20:53:17Z")

</div>

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