반응형
filter 함수에 "range"를 주어 추려낸다.
client = Elasticsearch()
timestamp_range = { "@timestamp": {
"gte": "2020-11-01",
"lt": "2020-11-02"
}
}
s = Search(using=client, index="my-index")
.filter("range", **timestamp_range)
src : stackoverflow.com/questions/58453236/query-timestamp-range-using-elasticsearch-dsl-py
728x90
'프로그래밍 > Python' 카테고리의 다른 글
Connected Component (0) | 2021.02.23 |
---|---|
파이썬초보 : 숫자계단 (0) | 2021.02.04 |
[파이썬초보] TypeError: 'NoneType' object is not subscriptable (0) | 2021.01.20 |
[Python초보] SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape (1) | 2021.01.15 |
[Python] WARNING: You are using pip version xx.xx.xx; however, version yy.yy.yy is available. (0) | 2021.01.07 |