Is there a way to efficiently determine which page of results a particular item falls on?

I'd like to be able to display search results sorted in a particular order (e.g. by date) but with the ability to start on the page where a specific item appears. In other words, if the item I'm interested in is 512th in the results and there are 50 items per page then I'd like to start on page 11.

Is there an efficient way to query ElasticSearch and determine that the index of the item of interest is 512? I could obviously "walk" the search results one page at a time looking for the item but that seems inefficient, especially if it is fairly far down the list.

(I'm aware of the default index.max_result_window limit of 10,000 results. Don't worry, the results list isn't that large).

Thanks,
Shane

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