# Clarifications regarding Mappings?

**URL:** <https://discuss.elastic.co/t/clarifications-regarding-mappings/74249>\
**Category:** Elasticsearch\
**Created:** [February 7, 2017, 4:34pm UTC](https://discuss.elastic.co/t/clarifications-regarding-mappings/74249 "2017-02-07T16:34:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 7, 2017, 4:34pm UTC](https://discuss.elastic.co/t/clarifications-regarding-mappings/74249/1 "2017-02-07T16:34:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)\
**Post date:** [February 7, 2017, 8:31pm UTC](https://discuss.elastic.co/t/clarifications-regarding-mappings/74249/2 "2017-02-07T20:31:29Z")

</div>

Hi,

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

Xavier

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 8, 2017, 3:03am UTC](https://discuss.elastic.co/t/clarifications-regarding-mappings/74249/3 "2017-02-08T03:03:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wenpos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wenpos/32/15326_2.png) [@wenpos](https://discuss.elastic.co/u/wenpos)\
**Post date:** [February 8, 2017, 4:38am UTC](https://discuss.elastic.co/t/clarifications-regarding-mappings/74249/4 "2017-02-08T04:38:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [February 8, 2017, 6:36am UTC](https://discuss.elastic.co/t/clarifications-regarding-mappings/74249/5 "2017-02-08T06:36:24Z")

</div>

Thanks..  
It really helped:🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 8, 2017, 6:36am UTC](https://discuss.elastic.co/t/clarifications-regarding-mappings/74249/6 "2017-03-08T06:36:26Z")

</div>

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