Elasticsearch how to query on ID field higher than x
<p>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. </p>

<p>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}}</p>

<p>This way I want to get the 1001 until 2000 result. after that 2001 until 3000, so on.</p>

<p>I currently use the Elasticsearch DSL for python to query on domain name like:</p>

<pre><code>search.query('match', domainname=domainname)
</code></pre>

<p>How do I rebuild this code to match above requirements. ('match',_ID > ID_Variable) </p>