getHits() and totalHits() give different no. of results set

(Anand kumar) #1

Hi All,

Am using elastic version 1.2.1, below is my searchquery, here the fromIndex refers to dynamic value which fetches result based on the page no,(10 results for each page) but when I try to iterate over the ResultSet, I got diff values for getHits() and totalHits(). For instance, I got 10 hits for each page and resultset shows different no of searchhits over the iterations, sometimes as 7, 8 and 9.

SearchRequestBuilder requestBuilder = client.prepareSearch()

Any suggestion would be helpful, thanks in advance.


(Colin Goodheart-Smithe) #2

Moving this to the Elasticsearch category since it is not to do with User Groups

(system) #3