Search, get bottom N search results, instead of top N, when size=N

(Md. Ziaul Haque) #1

Api = _search
sort = based on timestamp in desc order
Assume total result count is 10,

since size is 2, my query will return top 2 results, but I want to get
bottom 2, that is 9th and 10th results

how do I write my query to get result that way?


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit


Try use sort in asc order.

(system) #3