Elasticsearch: New type always adds a _parent#null field if no _parent mapping specified

Created on 12 Jul 2016  路  6Comments  路  Source: elastic/elasticsearch

PUT test 
{
  "mappings": {
    "type": {

    }
  }
}

GET test/_mapping/field/*

results in:

...
        "_parent#null": {
          "full_name": "_parent#null",
          "mapping": {}
        }
...
:SearcSearch >bug v5.0.0-alpha5

Most helpful comment

Pushed a test for that too since I had one already.

All 6 comments

Pushed a test for that too since I had one already.

I was concerned that the ParentFieldMapper also adds a _parent#null doc values field in this case. Luckily this is not the case. The _parent#null field only exists in the mapping, but it isn't doing anything.

@martijnvg was the _parent#null field only visible with the get field mapping API, or also with the mappings API?

Only with the get-field-mapping API. Doesn't that mean that it is a real Lucene field?

No, it only means that this field can be looked up by name in the mappings.

@jpountz Yes, only the get-field-mapping api. Also I verified that no such field was actually added to the Lucene index.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Praveen82 picture Praveen82  路  3Comments

dawi picture dawi  路  3Comments

rjernst picture rjernst  路  3Comments

makeyang picture makeyang  路  3Comments

jasontedor picture jasontedor  路  3Comments