Clarifications regarding Mappings?


(Yaswanth ) #1

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.


(Xavier Facq) #2

Hi,

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

Xavier


(Yaswanth ) #3

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..


(Fanfan) #4

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


(Yaswanth ) #5

Thanks..
It really helped::slight_smile:


(system) #6

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