# What happens to properties that are not explicitly named in the mapping?

**URL:** <https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904>\
**Category:** Elasticsearch\
**Created:** [July 20, 2011, 9:10am UTC](https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904 "2011-07-20T09:10:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pawel\_Krakowiak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pawel_krakowiak/32/2615_2.png) [@Pawel\_Krakowiak](https://discuss.elastic.co/u/Pawel_Krakowiak)\
**Post date:** [July 20, 2011, 9:10am UTC](https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904/1 "2011-07-20T09:10:19Z")

</div>

Say I have a simple mapping that defines only a few properties. Then I  
index documents that have a few times more properties, including the  
ones specified in the mapping. What happens to those extra properties  
that were not defined in the mapping? Are they simply omitted (i.e.,  
ignored - not indexed, not analyzed, not stored)?

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 20, 2011, 9:14am UTC](https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904/2 "2011-07-20T09:14:36Z")

</div>

On Wed, 2011-07-20 at 02:10 -0700, Pawel Krakowiak wrote:

> Say I have a simple mapping that defines only a few properties. Then I  
> index documents that have a few times more properties, including the  
> ones specified in the mapping. What happens to those extra properties  
> that were not defined in the mapping? Are they simply omitted (i.e.,  
> ignored - not indexed, not analyzed, not stored)?

They are dynamically added to the mapping based on the type of data they  
appear to be, eg strings are added as analyzed, numbers as not\_analyzed.

No field is set to 'stored' by default, as it is usually more efficient  
to just get the data out of \_source (ie the JSON document that you  
index)

clint

---

<div class="post-metadata">

**Author:** ![Pawel\_Krakowiak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pawel_krakowiak/32/2615_2.png) [@Pawel\_Krakowiak](https://discuss.elastic.co/u/Pawel_Krakowiak)\
**Post date:** [July 20, 2011, 10:24am UTC](https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904/3 "2011-07-20T10:24:56Z")

</div>

On 20 Lip, 11:14, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) wrote:

> They are dynamically added to the mapping based on the type of data they  
> appear to be, eg strings are added as analyzed, numbers as not\_analyzed.

So if I don't want to store something, I need to tell ES explicitly to  
skip it? Please note that I am talking of a scenario where I already  
have a mapping in place (hence not the situation where there's no  
mapping and I'm adding a document for the first time).

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 20, 2011, 10:32am UTC](https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904/4 "2011-07-20T10:32:12Z")

</div>

Hiya

> On 20 Lip, 11:14, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) wrote:
> 
> > They are dynamically added to the mapping based on the type of data they  
> > appear to be, eg strings are added as analyzed, numbers as not\_analyzed.
> 
> So if I don't want to store something, I need to tell ES explicitly to  
> skip it? Please note that I am talking of a scenario where I already  
> have a mapping in place (hence not the situation where there's no  
> mapping and I'm adding a document for the first time).

Note: there is a difference between 'store' and 'index'. No field is  
stored by default (except for the \_source).

However, all fields will be indexed by default, unless you specify  
otherwise

clint

---

<div class="post-metadata">

**Author:** ![Pawel\_Krakowiak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pawel_krakowiak/32/2615_2.png) [@Pawel\_Krakowiak](https://discuss.elastic.co/u/Pawel_Krakowiak)\
**Post date:** [July 20, 2011, 3:14pm UTC](https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904/5 "2011-07-20T15:14:14Z")

</div>

On 20 Lip, 12:32, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) wrote:

> Note: there is a difference between 'store' and 'index'. No field is  
> stored by default (except for the \_source).

Noted. Sorry for incorrect wording.

> However, all fields will be indexed by default, unless you specify  
> otherwise

I see. Thank you for the clarification.

---

<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:** [July 6, 2017, 4:00am UTC](https://discuss.elastic.co/t/what-happens-to-properties-that-are-not-explicitly-named-in-the-mapping/4904/6 "2017-07-06T04:00:02Z")

</div>


