Hits size and from not in JSON response?


(Lukáš Vlček) #1

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


(Shay Banon) #2

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 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


(system) #3