查询ES,查询历史数据,不同查询,查询结果一致;查询当天数据,不同查询,查询结果不一致
Elasticsearch | 作者 aaronhadoop | 发布于2017年01月09日 | 阅读数:8836
使用如下dsl查询ES,查询历史数据,不同查询,查询结果一致;查询当天数据,不同查询,查询结果不一致(第奇数次查询的结果一致,第偶数次的查询结果一致,但第奇数次查询和第偶数次查询结果不一致),请问下这种现象是为何呢
查询dsl语句:
curl -XGET es_ip:8080/index_name_20170109/_search?pretty -d '{
"sort": [{"dtEventTimeStamp": {"order": "desc"}}], "query": {"bool": {"filter": [{"range": {"dtEventTimeStamp": {"gte": 1483891200000, "lte": 1483932999000, "format": "epoch_millis"}}}], "must": [{"filtered": {"query": {"query_string": {"query": "*", "analyze_wildcard": true}}}}]}}, "from": 340, "highlight": {"fields": {"*": {}}, "post_tags": ["</mark>"], "require_field_match": false, "pre_tags": ["<mark>"]}, "size": 10
}'
(1483891200000对应2017-01-09 00:00:00,1483932999000对应2017-01-09 11:36:39)
查询dsl语句:
curl -XGET es_ip:8080/index_name_20170109/_search?pretty -d '{
"sort": [{"dtEventTimeStamp": {"order": "desc"}}], "query": {"bool": {"filter": [{"range": {"dtEventTimeStamp": {"gte": 1483891200000, "lte": 1483932999000, "format": "epoch_millis"}}}], "must": [{"filtered": {"query": {"query_string": {"query": "*", "analyze_wildcard": true}}}}]}}, "from": 340, "highlight": {"fields": {"*": {}}, "post_tags": ["</mark>"], "require_field_match": false, "pre_tags": ["<mark>"]}, "size": 10
}'
(1483891200000对应2017-01-09 00:00:00,1483932999000对应2017-01-09 11:36:39)
2 个回复
kennywu76 - Wood
赞同来自: medcl
参阅:
https://www.elastic.co/guide/e ... rence
https://www.elastic.co/guide/e ... .html
aaronhadoop
赞同来自: