title: Query by timestamp in ElasticSearch
body: <p>I would like to make a query in elastic search such as I only get the last 40 data I have on my database. For the moment my query is such :</p>
  <pre><code>  {
      &quot;size&quot;: 40,
      &quot;query&quot; : {
        &quot;exists&quot;: {
        &quot;field&quot;: &quot;transaction.domain&quot;
        }
        &quot;range&quot;: {
        &quot;@timestamp&quot; : {
            &quot;from&quot;: &quot;now-30mn&quot;,
            &quot;to&quot;: &quot;now&quot;
        }
      }
      }
    }
  </code></pre>
  <p>Thanks for your help.
  Victoire</p>