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


(Md. Ziaul Haque) #1

Assume,
Api = _search
size=2
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?

Thanks,
Ziaul

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7f0930d9-91b9-4dd5-b750-822d8e135fa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


#2

Try use sort in asc order.


(system) #3