Clarifications regarding Mappings?

Hi,

I have few questions regarding the mappings:

1)Scenario 1:I had customized mapping for an index when i add a document which has extra fields or less fields than the custom mappings then the document will be indexed or Elasticsearch rejects it.

2)Scenario 2:I have defined template for an index , If the documents that are send to index doesn't satisfy the mappings that are defined in template(i.e.if it has extra fields or empty fields) whether Elasticsearch indexes it or rejects it.

Why?

Thanks.

Hi,

In both cases, documents wil be indexed, and Elasticsearch will "detect" type of extra fields and adapt the index mapping.

Xavier

Thanks for your response..
But what i want is , I want to index the documents that satisfy only my customized or template mappings others i dont want to index it.

Is this possible in Elasticsearch ?

Thanks..

there exists a parameter - dynamic in mapping setup may help:
https://www.elastic.co/guide/en/elasticsearch/reference/5.2/dynamic.html

1 Like

Thanks..
It really helped::slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.