Iterate over the whole response without size 'predefined' using JAVA API

(anusha) #1


How to make my search response to give all the documents matched to the relevant query without using any
setSize(10) with predefined value.
How can I achieve this????

Right now am using :
response = client.prepareSearch(index).setTypes(type)

Here when I would like to get the complete response and i dont know the size in advance, then how can I achieve the complete response without size declaration. (or) any other way to get the complete data??

(Mark Walkom) #2

Perhaps scan and scroll is what you want?

(anusha) #3

Can you provide me the Java API for that scroll operation by including that in the above example or any examples on how to use the scroll with Java API????????

(Colin Goodheart-Smithe) #4

Here is a link to the Java API documentation on using the scroll API:

(system) #5