elasticsearch 在Elasticsearch中搜索Zulu日期格式的文档,elasticsearch,time,elasticsearch,Time" /> elasticsearch 在Elasticsearch中搜索Zulu日期格式的文档,elasticsearch,time,elasticsearch,Time" />

elasticsearch 在Elasticsearch中搜索Zulu日期格式的文档

elasticsearch 在Elasticsearch中搜索Zulu日期格式的文档,elasticsearch,time,elasticsearch,Time,我在elasticsearch中有一个名为MsgTime的字段。我正在尝试对相同的对象执行范围查询。以下是我迄今为止所做的尝试 curl -X GET --header 'Content-Type:application/json' http:localhost:9200/myindex/_count -d '{"query":{"bool":{"must":[{"range":{"MsgTime":{"gte": "2020-04-16T18:46:02.048Z", "lte": "2020

我在elasticsearch中有一个名为MsgTime的字段。我正在尝试对相同的对象执行范围查询。以下是我迄今为止所做的尝试

curl -X GET --header 'Content-Type:application/json' http:localhost:9200/myindex/_count -d '{"query":{"bool":{"must":[{"range":{"MsgTime":{"gte": "2020-04-16T18:46:02.048Z",
"lte": "2020-05-18T18:46:02.048Z"}}}]}}}'
无论我在这个范围内给出什么日期范围,我都会得到相同数量的计数,我知道这是不正确的。我错过了什么

索引文档的示例。我在索引中有超过1亿个文档

          "EndTime" : "2020-05-18T18:44:07.000Z",
          "StartTime" : "2020-05-18T17:40:46.000Z",
          "RollID" : "812755",
          "MachineID" : "Y5BI",
          "PersonalID" : "1075",
          "JMSTopic" : "received",
          "Org" : "test",
          "status" : "processed",
          "MsgTime" : "2020-05-18T18:46:02.048Z"  --> This is the element I am trying to execute the range query on

无法复制。你确定在不同的范围内得到相同的计数吗

_count响应如下所示:

{
  "count" : 1,            <-- this
  "_shards" : {
    "total" : 25,         <-- not this
    "successful" : 25,
    "skipped" : 0,
    "failed" : 0
  }
}

无法复制。你确定在不同的范围内得到相同的计数吗

_count响应如下所示:

{
  "count" : 1,            <-- this
  "_shards" : {
    "total" : 25,         <-- not this
    "successful" : 25,
    "skipped" : 0,
    "failed" : 0
  }
}