When indexing a document, when there is a field named "_id" in the source, 
the fields that come after this one don't get added to the mapping, even 
though they are stored in the _source:

PUT /megacorp/blah/3
{
  "a": "b",
  "_id" : {},
  "c": "d"
}

The document got stored:

GET megacorp/blah/_search
{
   "took": 8,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },
   "hits": {
      "total": 1,
      "max_score": 1,
      "hits": [
         {
            "_index": "megacorp",
            "_type": "blah",
            "_id": "3",
            "_score": 1,
            "_source": {
               "a": "b",
               "_id": {},
               "c": "d"
            }
         }
      ]
   }
}

But no mapping was added for "c":

GET /megacorp/_mapping/blah
{
   "megacorp": {
      "mappings": {
         "blah": {
            "properties": {
               "a": {
                  "type": "string"
               }
            }
         }
      }
   }
}

Is this expected behavior?

Regards,
André

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/4498c028-9013-479b-a8ee-c43b8edc277f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to