I am trying to apply pagination to results by querying multiple times to get past the 10k barrier of Elasticsearch. Since the results of Elasticsearch can differ during multiple queries I want to use the generated ID to get the next results.
So for example, I run a query that returns 1000 results. Then I want to get the ID value of the 1000th result, and perform a query like : match : ID {{1000thID}}
This way I want to get the 1001 until 2000 result. after that 2001 until 3000, so on.
I currently use the Elasticsearch DSL for python to query on domain name like:
search.query('match', domainname=domainname)
How do I rebuild this code to match above requirements. ('match',_ID > ID_Variable)