Elasticsearch词条查询不适用于数字

时间:2018-07-24 15:16:30

标签: elasticsearch elasticsearch-2.0

尽管根据文档(term Query with numbers),它仍然可以工作,但我无法对数字值(ES 2.3)使用经过过滤的found-file.js查询来执行搜索:

term

结果:

GET log_*/_search

{
  "query": {
    "bool": {
      "filter": [
        {"term": {"message.type": "processing"}}
      ]
    }
  }

如果我查询在上一个查询中返回的同一{ "took": 7, "timed_out": false, "hits": { "total": 9454958, "max_score": 0, "hits": [ { "_index": "log_2018-07-20", "_type": "INFO", "_id": "AWS3u23h9aQ1Q463t1cE", "_score": 0, "_source": { "message": { "trackid": 1767513415295398400, "type": "processing", // other data ... }, "ts": "2018-07-20T12:47:46.867271" } }, // other results ... ] } } ...

message.trackid

...我什么也没得到:

GET log_*/_search

{
  "query": {
    "bool": {
      "filter": [
        {"term": {"message.trackid": 1767513415295398400}}
      ]
    }
  }
}

字段映射:

{
  "took": 2,
  "timed_out": false,
  "hits": {
    "total": 0,
    "max_score": null,
    "hits": []
  }
}

有什么想法吗?

0 个答案:

没有答案