# Different counts on match\_all

**URL:** <https://discuss.elastic.co/t/different-counts-on-match-all/3260>\
**Category:** Elasticsearch\
**Created:** [August 26, 2010, 10:38am UTC](https://discuss.elastic.co/t/different-counts-on-match-all/3260 "2010-08-26T10:38:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Korbakov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_korbakov/32/3199_2.png) [@Michael\_Korbakov](https://discuss.elastic.co/u/Michael_Korbakov)\
**Post date:** [August 26, 2010, 10:38am UTC](https://discuss.elastic.co/t/different-counts-on-match-all/3260/1 "2010-08-26T10:38:07Z")

</div>

Hi everyone.

I'm getting bit strange results for results counts. Basically they are different every time:

eqx-web6:/home/es/tests# while true; do date && curl -XGET '[http://localhost:9200/standard/\_count](http://localhost:9200/standard/_count)' -d '{"match\_all" : { }}' && echo; sleep 1; done;  
Wed Aug 25 17:21:31 CEST 2010  
{"count":8647582,"\_shards":{"total":16,"successful":16,"failed":0}}  
Wed Aug 25 17:21:32 CEST 2010  
{"count":8647579,"\_shards":{"total":16,"successful":16,"failed":0}}  
Wed Aug 25 17:21:33 CEST 2010  
{"count":8647564,"\_shards":{"total":16,"successful":16,"failed":0}}  
Wed Aug 25 17:21:34 CEST 2010  
{"count":8647582,"\_shards":{"total":16,"successful":16,"failed":0}}  
Wed Aug 25 17:21:35 CEST 2010  
{"count":8647579,"\_shards":{"total":16,"successful":16,"failed":0}}  
...

I assuming that they are just estimates, but how can I reliably get to the last 10 results? Querying for the last "page" sometimes gives me some results and sometimes no results at all.

Thank you in advance,

-- Michael Korbakov

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [August 26, 2010, 10:41am UTC](https://discuss.elastic.co/t/different-counts-on-match-all/3260/2 "2010-08-26T10:41:46Z")

</div>

Hi Michael

> I'm getting bit strange results for results counts. Basically they are  
> different every time:

- what version are you using?

- how many nodes?

- are you doing any indexing or deleting while running these queries

- try flushing before you run your counts:

> 

clint

> eqx-web6:/home/es/tests# while true; do date && curl -XGET  
> '[http://localhost:9200/standard/\_count](http://localhost:9200/standard/_count)' -d '{"match\_all" : { }}' &&  
> echo; sleep 1; done;  
> Wed Aug 25 17:21:31 CEST 2010  
> {"count":8647582,"\_shards":{"total":16,"successful":16,"failed":0}}  
> Wed Aug 25 17:21:32 CEST 2010  
> {"count":8647579,"\_shards":{"total":16,"successful":16,"failed":0}}  
> Wed Aug 25 17:21:33 CEST 2010  
> {"count":8647564,"\_shards":{"total":16,"successful":16,"failed":0}}  
> Wed Aug 25 17:21:34 CEST 2010  
> {"count":8647582,"\_shards":{"total":16,"successful":16,"failed":0}}  
> Wed Aug 25 17:21:35 CEST 2010  
> {"count":8647579,"\_shards":{"total":16,"successful":16,"failed":0}}  
> ...
> 
> I assuming that they are just estimates, but how can I reliably get to  
> the last 10 results? Querying for the last "page" sometimes gives me  
> some results and sometimes no results at all.
> 
> Thank you in advance,
> 
> -- Michael Korbakov

--  
Web Announcements Limited is a company registered in England and Wales,  
with company number 05608868, with registered address at 10 Arvon Road,  
London, N5 1PR.

---

<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, 4:20am UTC](https://discuss.elastic.co/t/different-counts-on-match-all/3260/3 "2017-07-06T04:20:18Z")

</div>


