About setsize Java API


(Kun Niu) #1

Hi all,
I don't know if anyone has the same problem or the API is deliberately
designed like this.
I have 5 shards and each time I call setSize to get a certain number
of results, I got 5 times size records back.
I wonder if there's any way to specify only the number in the setSize
API as the number of results.

Thanks and best regards,
Kun


(Shay Banon) #2

If you are using query_and_fetch, thats how it works. You should, 99% of the
time, use query_then_fetch.

On Mon, Aug 1, 2011 at 11:38 PM, Rent a room haoniukun@gmail.com wrote:

Hi all,
I don't know if anyone has the same problem or the API is deliberately
designed like this.
I have 5 shards and each time I call setSize to get a certain number
of results, I got 5 times size records back.
I wonder if there's any way to specify only the number in the setSize
API as the number of results.

Thanks and best regards,
Kun


(system) #3