Get the last , second last Document


(Niraj Pandey) #1

Hi ,

While using size = 1 we get the last document (@timestamp is in desc order) from ES cluster .
Is there any way like the above get the second last , third last document from elastic cluster ?


(David Pilato) #2

You can use from=0 to get the 1st document then from=1 to get the next one, then from=2 to get the next one...


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.