0

我不明白为什么 ES 在过滤时将数组中的 _id 字段加倍。

curl -X GET "http://localhost:9200/pgep-development_broadcasts/broadcast/_search?pretty=true" -d '{"query":{"match_all":{}},"fields":["_id" , “标题”]}'
{
  “接受”:7,
  “超时”:假,
  “_shards”:{
    “总数”:5,
    “成功”:5,
    “失败”:0
  },
  “命中”:{
    “总数”:1,
    “最大分数”:1.0,
    “命中”:[{
      "_index" : "pgep-development_broadcasts",
      "_type" : "广播",
      "_id" : "50ed959dcc93282abc000062",
      “_score”:1.0,
      “字段”:{
        “_id”:[“50ed959dcc93282abc000062”,“50ed959dcc93282abc000062”],
        "title" : "24 heures d'info"
      }
    }]
  }
}
4

1 回答 1

1

您可能遇到了这个错误https://github.com/elasticsearch/elasticsearch/issues/2161。如果是这种情况,您可以简单地停止存储 id 字段。

于 2013-01-29T02:14:32.947 回答