# Total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/

**URL:** https://discuss.elastic.co/t/total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/156617
**Category:** Elasticsearch
**Created:** [November 14, 2018, 9:39am UTC](https://discuss.elastic.co/t/total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/156617 "2018-11-14T09:39:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)
#### Post date: [November 14, 2018, 9:39am UTC](https://discuss.elastic.co/t/total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/156617/1 "2018-11-14T09:39:15Z")

</div>

Please refer this thread last reply. Nothing really helps. This inconsistent behaviour cause lot of trouble

> [@Total Hits in elastic Search prepareSearch() behaves in an inconsistent manner](https://discuss.elastic.co/t/total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/150963/15):
>
> MatchPhrase too cant help. Again inconsistent results some times 28, sometimes 10. please find the response below. { "took": 0, "timed\_out": false, "\_shards": { "total": 1, "successful": 1, "skipped": 0, "failed": 0 }, "hits": { "total": 22, "max\_score": 0.021978907, "hits": [..........] } } I'm using reactive pattern. Does it make any difference? Observable.create(new OnSubscribe\<List\<InnerSearchHits\>\>() { @Override public void call(Subscriber\<? super List\<InnerSearchHits\>\>…

can you please provide a solution?? I have tried with scroll response.But same inconsistent behaviour is there

---

<div class="post-metadata">

### Author: ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)
#### Post date: [November 19, 2018, 5:17am UTC](https://discuss.elastic.co/t/total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/156617/2 "2018-11-19T05:17:40Z")

</div>

Can someone help here please?

---

<div class="post-metadata">

### Author: ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)
#### Post date: [November 19, 2018, 10:11am UTC](https://discuss.elastic.co/t/total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/156617/3 "2018-11-19T10:11:26Z")

</div>

Does it have some thing to do with score?? Should I check anywhere about score?

---

<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: [December 17, 2018, 10:11am UTC](https://discuss.elastic.co/t/total-hits-in-elastic-search-preparesearch-behaves-in-an-inconsistent-manner/156617/4 "2018-12-17T10:11:39Z")

</div>

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