How to paginate items with specified order with ElasticSearch

Im trying to browse a user's ratings sorted by their rating date with pagination. If it's simply getting a page of results then I can just paginate before calling ElasticSearch, i.e. fetch 20 items sorted by rating date, fetch 20 items from ES by itemId, sort results by the order of ratings.

But I run into an issue if the user wants to filter their results, i.e. their ratings w/ items that are "$50 or less". If I have the offset and limit parameters it will just return the first 20 items it finds since I sort it after it returns from ES.

Is there a way to call ES with all rating IDs, then sort, filter & paginate on ES?

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