# Hits size and from not in JSON response?

**URL:** <https://discuss.elastic.co/t/hits-size-and-from-not-in-json-response/3140>\
**Category:** Elasticsearch\
**Created:** [July 23, 2010, 1:34pm UTC](https://discuss.elastic.co/t/hits-size-and-from-not-in-json-response/3140 "2010-07-23T13:34:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [July 23, 2010, 1:34pm UTC](https://discuss.elastic.co/t/hits-size-and-from-not-in-json-response/3140/1 "2010-07-23T13:34:39Z")

</div>

Hi,

not sure if I missed anything but is there any way for the REST client to  
learn from the JSON response what the values of FROM and SIZE were?  
There is value of hits.total but imagine that hits.total = 10 but the  
hits.hits = [one\_item\_array\_only]. So is the reason that there is just one  
item in the hits array the fact that from = 9 and size \> 0 or it is that  
from \< 9 and size = 1 ?  
Wouldn't it be useful to add these two values into hits section? (hits.from,  
hits.size)

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 23, 2010, 2:50pm UTC](https://discuss.elastic.co/t/hits-size-and-from-not-in-json-response/3140/2 "2010-07-23T14:50:31Z")

</div>

No, there isn't a way. I usually tend not to repeat what was sent in the  
response, though it might be relevant in this case. What do others think?

-shay.banon

On Fri, Jul 23, 2010 at 4:34 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> not sure if I missed anything but is there any way for the REST client to  
> learn from the JSON response what the values of FROM and SIZE were?  
> There is value of hits.total but imagine that hits.total = 10 but the  
> hits.hits = [one\_item\_array\_only]. So is the reason that there is just one  
> item in the hits array the fact that from = 9 and size \> 0 or it is that  
> from \< 9 and size = 1 ?  
> Wouldn't it be useful to add these two values into hits section?  
> (hits.from, hits.size)
> 
> Regards,  
> Lukas

---

<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:21am UTC](https://discuss.elastic.co/t/hits-size-and-from-not-in-json-response/3140/3 "2017-07-06T04:21:46Z")

</div>


