# Different results for the same query

**URL:** <https://discuss.elastic.co/t/different-results-for-the-same-query/18181>\
**Category:** Elasticsearch\
**Created:** [June 18, 2014, 1:05pm UTC](https://discuss.elastic.co/t/different-results-for-the-same-query/18181 "2014-06-18T13:05:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias\_Gawlista](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias_gawlista/32/1296_2.png) [@Mathias\_Gawlista](https://discuss.elastic.co/u/Mathias_Gawlista)\
**Post date:** [June 18, 2014, 1:05pm UTC](https://discuss.elastic.co/t/different-results-for-the-same-query/18181/1 "2014-06-18T13:05:38Z")

</div>

Hi,

I've setup Elasticsearch with 1 cluster á 4 nodes.

When I call a simple query like the following one multiple times I get  
different hits in the response:

curl -XGET '[http://localhost:9200/index\_name/\_search?q=term&pretty=true](http://localhost:9200/index_name/_search?q=term&pretty=true)'

What can I do?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2014, 1:19pm UTC](https://discuss.elastic.co/t/different-results-for-the-same-query/18181/2 "2014-06-18T13:19:08Z")

</div>

Are the results inconsistent?  
I mean that you have a different number of documents found each time?

Or you have the same total hits but the first ten hits are different each time?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 18 juin 2014 à 15:05:43, Mathias Gawlista ([gawlista@gmail.com](mailto:gawlista@gmail.com)) a écrit:

Hi,

I've setup Elasticsearch with 1 cluster á 4 nodes.

When I call a simple query like the following one multiple times I get different hits in the response:

curl -XGET '[http://localhost:9200/index\_name/\_search?q=term&pretty=true](http://localhost:9200/index_name/_search?q=term&pretty=true)'

What can I do?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53a191cc.5bd062c2.5d8%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53a191cc.5bd062c2.5d8%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mathias\_Gawlista](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias_gawlista/32/1296_2.png) [@Mathias\_Gawlista](https://discuss.elastic.co/u/Mathias_Gawlista)\
**Post date:** [June 18, 2014, 1:30pm UTC](https://discuss.elastic.co/t/different-results-for-the-same-query/18181/3 "2014-06-18T13:30:20Z")

</div>

I got different total hits and different 10 hits each time.

Am Mittwoch, 18. Juni 2014 15:19:18 UTC+2 schrieb David Pilato:

> Are the results inconsistent?  
> I mean that you have a different number of documents found each time?
> 
> Or you have the same total hits but the first ten hits are different each  
> time?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 18 juin 2014 à 15:05:43, Mathias Gawlista ([gawl...@gmail.com](mailto:gawl...@gmail.com)  
> \<javascript:\>) a écrit:
> 
> Hi,
> 
> I've setup Elasticsearch with 1 cluster á 4 nodes.
> 
> When I call a simple query like the following one multiple times I get  
> different hits in the response:
> 
> curl -XGET '[http://localhost:9200/index\_name/\_search?q=term&pretty=true](http://localhost:9200/index_name/_search?q=term&pretty=true)'
> 
> ## What can I do?
> 
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/98d94442-ac4e-498c-b46f-0e0b1db1809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98d94442-ac4e-498c-b46f-0e0b1db1809b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2014, 3:04pm UTC](https://discuss.elastic.co/t/different-results-for-the-same-query/18181/4 "2014-06-18T15:04:33Z")

</div>

One or more shard is not up to date I think.  
May you had at some point something wrong. Can't you see something strange in logs?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 18 juin 2014 à 15:30:23, Mathias Gawlista ([gawlista@gmail.com](mailto:gawlista@gmail.com)) a écrit:

I got different total hits and different 10 hits each time.

Am Mittwoch, 18. Juni 2014 15:19:18 UTC+2 schrieb David Pilato:  
Are the results inconsistent?  
I mean that you have a different number of documents found each time?

Or you have the same total hits but the first ten hits are different each time?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 18 juin 2014 à 15:05:43, Mathias Gawlista ([gawl...@gmail.com](mailto:gawl...@gmail.com)) a écrit:

Hi,

I've setup Elasticsearch with 1 cluster á 4 nodes.

When I call a simple query like the following one multiple times I get different hits in the response:

curl -XGET '[http://localhost:9200/index\_name/\_search?q=term&pretty=true](http://localhost:9200/index_name/_search?q=term&pretty=true)'

What can I do?

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f32352c2-ea8a-451a-aca9-9c527b2e9ddf%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/98d94442-ac4e-498c-b46f-0e0b1db1809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98d94442-ac4e-498c-b46f-0e0b1db1809b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53a1aa81.4e6afb66.5d8%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53a1aa81.4e6afb66.5d8%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mathias\_Gawlista](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias_gawlista/32/1296_2.png) [@Mathias\_Gawlista](https://discuss.elastic.co/u/Mathias_Gawlista)\
**Post date:** [June 19, 2014, 11:59am UTC](https://discuss.elastic.co/t/different-results-for-the-same-query/18181/5 "2014-06-19T11:59:28Z")

</div>

No strange entries in the log.

As a temporary solution I rebuild the index through Ruby gem tire:  
ModelName.rebuild\_index

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4554b1b6-dc2e-4235-9505-8662cbcbc708%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4554b1b6-dc2e-4235-9505-8662cbcbc708%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:21am UTC](https://discuss.elastic.co/t/different-results-for-the-same-query/18181/6 "2017-07-06T01:21:12Z")

</div>


