# Count of hits in json different from reality

**URL:** <https://discuss.elastic.co/t/count-of-hits-in-json-different-from-reality/115531>\
**Category:** Kibana\
**Created:** [January 15, 2018, 11:32am UTC](https://discuss.elastic.co/t/count-of-hits-in-json-different-from-reality/115531 "2018-01-15T11:32:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruno-d](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@bruno-d](https://discuss.elastic.co/u/bruno-d)\
**Post date:** [January 15, 2018, 11:32am UTC](https://discuss.elastic.co/t/count-of-hits-in-json-different-from-reality/115531/1 "2018-01-15T11:32:08Z")

</div>

Hi i have some query in kibana or using python script that have the same behaviour. the json answer contain max 10 fields while results appear to be 36 for instance. the _hits_ structure contain only 10 answers ?  
Someone know why ?😀  
thanks  
{  
"took": 391,  
"timed\_out": false,  
"\_shards": {  
**"total": 36,**  
\*\* "successful": 36,\*\*  
"skipped": 0,  
"failed": 0  
},  
"hits": {  
**"total": 38,**  
"max\_score": 9.327275,  
"hits": [  
{

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [January 15, 2018, 11:52am UTC](https://discuss.elastic.co/t/count-of-hits-in-json-different-from-reality/115531/2 "2018-01-15T11:52:57Z")

</div>

Hi,

first: you highlighted two complete different "totals" up there. One of the totals, was inside the `_shards` object giving your information on how many shards that query hit, and how many of them returned a successful result.

The second `total` in `hits` is the actual total of documents, that would be returned. If you receive only 10 of those results, that's because you most likely haven't specified the [size parameter](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html). By default you will then only get the first 10 results of those total 38 results in your case.

You can increase the `size` parameter to get more results.

Cheers,  
Tim

---

<div class="post-metadata">

**Author:** ![bruno-d](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@bruno-d](https://discuss.elastic.co/u/bruno-d)\
**Post date:** [January 15, 2018, 5:09pm UTC](https://discuss.elastic.co/t/count-of-hits-in-json-different-from-reality/115531/3 "2018-01-15T17:09:24Z")

</div>

thanks tim. done. 👍

---

<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:** [February 12, 2018, 5:09pm UTC](https://discuss.elastic.co/t/count-of-hits-in-json-different-from-reality/115531/4 "2018-02-12T17:09:50Z")

</div>

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