# How does elasticsearch stores field mappings for every lucene index?

**URL:** <https://discuss.elastic.co/t/how-does-elasticsearch-stores-field-mappings-for-every-lucene-index/70174>\
**Category:** Elasticsearch\
**Created:** [December 29, 2016, 2:59am UTC](https://discuss.elastic.co/t/how-does-elasticsearch-stores-field-mappings-for-every-lucene-index/70174 "2016-12-29T02:59:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrskumaran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rrskumaran/32/14198_2.png) [@rrskumaran](https://discuss.elastic.co/u/rrskumaran)\
**Post date:** [December 29, 2016, 2:59am UTC](https://discuss.elastic.co/t/how-does-elasticsearch-stores-field-mappings-for-every-lucene-index/70174/1 "2016-12-29T02:59:35Z")

</div>

while update documents, elasticsearch knows which field is analyzed, not\_analyzed, numeric. How does it store this information for every index? within every index? any pointers to elasticsearch source code ?

During update and search, this field information is used for applying keywordanalyzer for not\_analyzed fields and range query for numeric

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 29, 2016, 9:13am UTC](https://discuss.elastic.co/t/how-does-elasticsearch-stores-field-mappings-for-every-lucene-index/70174/2 "2016-12-29T09:13:35Z")

</div>

Hey,

this is stored per index per type in the [mapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/mapping.html) - which in turn is part of the [cluster state](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/cluster-state.html)

--Alex

---

<div class="post-metadata">

**Author:** ![rrskumaran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rrskumaran/32/14198_2.png) [@rrskumaran](https://discuss.elastic.co/u/rrskumaran)\
**Post date:** [January 4, 2017, 7:51pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-stores-field-mappings-for-every-lucene-index/70174/3 "2017-01-04T19:51:57Z")

</div>

Hi Alex

Thank you. Your input helped me a lot.

---

<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:** [February 1, 2017, 7:52pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-stores-field-mappings-for-every-lucene-index/70174/4 "2017-02-01T19:52:01Z")

</div>

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