擅长:python、mysql、java
<p>试试这个:</p>
<pre><code>from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
client = Elasticsearch(<connection_details>)
s = Search(using=client, index="my-index") \
.filter('range' , **{'@timestamp': {'gte': 1570258800000 , 'lt': 1571036400000, 'format' : 'epoch_millis'}})
</code></pre>