Getting Nth max/min record from a index

(cj_elastic) #1

I need to get nth max record. eg. get 100,000 th record which was created latest based on a field created_time. I also have a custom doc_id which is random. Or is there any other default field created by elasticsearch that could be used for this.

What would be the best approach for this requirement using java API 5.4 client

I could come up with scroll API mentioned here. Is there any better solution

Thanks for reply,

(system) #2

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