Clarifications regarding Mappings?


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.




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


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 ?


there exists a parameter - dynamic in mapping setup may help:

1 Like

It really helped::slight_smile:

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