# Update mappings all the time

**URL:** <https://discuss.elastic.co/t/update-mappings-all-the-time/5411>\
**Category:** Elasticsearch\
**Created:** [September 20, 2011, 12:32am UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411 "2011-09-20T00:32:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Cook](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@James\_Cook](https://discuss.elastic.co/u/James_Cook)\
**Post date:** [September 20, 2011, 12:32am UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/1 "2011-09-20T00:32:56Z")

</div>

It seems that every time I index a document, I get the update mapping log  
statements.

Indexing document, index [ppkc], type [activities], key  
[5260d986257c472db42d405f91158062]  
[Stacy X] processing [update-mapping [ppkc][activities]]: execute  
[Stacy X] [ppkc] update\_mapping [activities] (dynamic)  
[Stacy X] cluster state updated: version [8], source [update-mapping  
[ppkc][activities]]

It's a pretty quick operation, but I don't understand why it is happening. I  
am not using dynamic mapping so I am unsure why this is happening?

-- jim

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 20, 2011, 5:08am UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/2 "2011-09-20T05:08:41Z")

</div>

Can you gist some activities documents ?

David 😉

Le 20 sept. 2011 à 02:32, James Cook [jcook@tracermedia.com](mailto:jcook@tracermedia.com) a écrit :

> It seems that every time I index a document, I get the update mapping log statements.
> 
> Indexing document, index [ppkc], type [activities], key [5260d986257c472db42d405f91158062]  
> [Stacy X] processing [update-mapping [ppkc][activities]]: execute  
> [Stacy X] [ppkc] update\_mapping [activities] (dynamic)  
> [Stacy X] cluster state updated: version [8], source [update-mapping [ppkc][activities]]
> 
> It's a pretty quick operation, but I don't understand why it is happening. I am not using dynamic mapping so I am unsure why this is happening?
> 
> -- jim

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 20, 2011, 8:30am UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/3 "2011-09-20T08:30:32Z")

</div>

If you are not using dynamic mapping, then you shouldn't see this messages.  
Can you gist a recreation?

On Tue, Sep 20, 2011 at 8:08 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Can you gist some activities documents ?
> 
> David 😉
> 
> Le 20 sept. 2011 à 02:32, James Cook [jcook@tracermedia.com](mailto:jcook@tracermedia.com) a écrit :
> 
> > It seems that every time I index a document, I get the update mapping log  
> > statements.
> > 
> > Indexing document, index [ppkc], type [activities], key  
> > [5260d986257c472db42d405f91158062]  
> > [Stacy X] processing [update-mapping [ppkc][activities]]: execute  
> > [Stacy X] [ppkc] update\_mapping [activities] (dynamic)  
> > [Stacy X] cluster state updated: version [8], source [update-mapping  
> > [ppkc][activities]]
> > 
> > It's a pretty quick operation, but I don't understand why it is  
> > happening. I am not using dynamic mapping so I am unsure why this is  
> > happening?
> > 
> > -- jim

---

<div class="post-metadata">

**Author:** ![James\_Cook](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@James\_Cook](https://discuss.elastic.co/u/James_Cook)\
**Post date:** [September 20, 2011, 10:00pm UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/4 "2011-09-20T22:00:18Z")

</div>

Hmmm, well we aren't using dynamic mapping, but we do put our mappings into  
a directory for ES to discover. Could it be that ES starts up with dynamic  
mapping, then discovers the mapping files I have for each type? Then when I  
index a document, it issues an update\_mapping call even though I am indexing  
a document to one of my types that is mapped?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 20, 2011, 10:05pm UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/5 "2011-09-20T22:05:34Z")

</div>

What do you mean by putting it in a directory for elasticsearch to discvoer?  
Mappings in the config location are applied when the index gets created  
(which happens before a document gets indexed).

On Wed, Sep 21, 2011 at 1:00 AM, James Cook [jcook@tracermedia.com](mailto:jcook@tracermedia.com) wrote:

> Hmmm, well we aren't using dynamic mapping, but we do put our mappings into  
> a directory for ES to discover. Could it be that ES starts up with dynamic  
> mapping, then discovers the mapping files I have for each type? Then when I  
> index a document, it issues an update\_mapping call even though I am indexing  
> a document to one of my types that is mapped?

---

<div class="post-metadata">

**Author:** ![James\_Cook](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@James\_Cook](https://discuss.elastic.co/u/James_Cook)\
**Post date:** [September 21, 2011, 3:41am UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/6 "2011-09-21T03:41:08Z")

</div>

Right, but if I explicitly create the mappings using the API as part of the  
index creation, I do not see the log statements in the original post.

[Stacy X] processing [update-mapping [ppkc][activities]]: execute  
[Stacy X] [ppkc] update\_mapping [activities] (dynamic)  
[Stacy X] cluster state updated: version [8], source [update-mapping  
[ppkc][activities]]

What triggers the update-mapping log statements, and why does it say  
(dynamic)?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 22, 2011, 11:11am UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/7 "2011-09-22T11:11:15Z")

</div>

The log message comes from an index operation causing for un mapped fields  
to be introduced. I think we can move faster I can somehow recreate it?

On Wed, Sep 21, 2011 at 6:41 AM, James Cook [jcook@tracermedia.com](mailto:jcook@tracermedia.com) wrote:

> Right, but if I explicitly create the mappings using the API as part of the  
> index creation, I do not see the log statements in the original post.
> 
> [Stacy X] processing [update-mapping [ppkc][activities]]: execute  
> [Stacy X] [ppkc] update\_mapping [activities] (dynamic)  
> [Stacy X] cluster state updated: version [8], source [update-mapping  
> [ppkc][activities]]
> 
> What triggers the update-mapping log statements, and why does it say  
> (dynamic)?

---

<div class="post-metadata">

**Author:** ![James\_Cook](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@James\_Cook](https://discuss.elastic.co/u/James_Cook)\
**Post date:** [September 22, 2011, 6:37pm UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/8 "2011-09-22T18:37:34Z")

</div>

Thanks for the hint. I will look at our mappings and make sure no new  
properties are being introduced. I will gist if that isn't the problem.  
Thanks.

---

<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, 3:53am UTC](https://discuss.elastic.co/t/update-mappings-all-the-time/5411/9 "2017-07-06T03:53:46Z")

</div>


