0
votes

I don't understand why ES doubles my _id field in an array when I'm filtering on it.

curl -X GET "http://localhost:9200/pgep-development_broadcasts/broadcast/_search?pretty=true" -d '{"query":{"match_all":{}},"fields":["_id", "title"]}'
{
  "took" : 7,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "hits" : {
    "total" : 1,
    "max_score" : 1.0,
    "hits" : [ {
      "_index" : "pgep-development_broadcasts",
      "_type" : "broadcast",
      "_id" : "50ed959dcc93282abc000062",
      "_score" : 1.0,
      "fields" : {
        "_id" : [ "50ed959dcc93282abc000062", "50ed959dcc93282abc000062" ],
        "title" : "24 heures d'info"
      }
    } ]
  }
}
1
Can you add a source document and your mapping (if it's not default)?dadoonet
What version of ES are you using, what does your mapping look like, and how are you indexing this doc?DrTech

1 Answers

1
votes

You are probably hitting this bug https://github.com/elasticsearch/elasticsearch/issues/2161. If this is the case, you can simply stop storing id field.