# Dynamic mapping

**URL:** <https://discuss.elastic.co/t/dynamic-mapping/248598>\
**Category:** Elasticsearch\
**Created:** [September 15, 2020, 4:39am UTC](https://discuss.elastic.co/t/dynamic-mapping/248598 "2020-09-15T04:39:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milan\_Suthar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/milan_suthar/32/74944_2.png) [@Milan\_Suthar](https://discuss.elastic.co/u/Milan_Suthar)\
**Post date:** [September 15, 2020, 4:39am UTC](https://discuss.elastic.co/t/dynamic-mapping/248598/1 "2020-09-15T04:39:56Z")

</div>

ES version 6.8.12  
i want to make my index filed store anything regardless of its type  
im facing issue while storing string value in long type field  
can anyone help me

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 15, 2020, 5:28am UTC](https://discuss.elastic.co/t/dynamic-mapping/248598/2 "2020-09-15T05:28:17Z")

</div>

> [@Milan\_Suthar](#):
>
> im facing issue while storing string value in long type field

What is the issue exactly?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 15, 2020, 5:58am UTC](https://discuss.elastic.co/t/dynamic-mapping/248598/3 "2020-09-15T05:58:07Z")

</div>

Elasticsearch is not a schemaless datastore but rather creates the schema on write as data is discovered. Every field must have a single mapping, which means it typically can not handle completely dynamic data. While all fields can be stored as mapped as strings (which limit what you can do with them) A field can not be an object (have sub fields) and in another place hold a value.

---

<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:** [October 13, 2020, 5:58am UTC](https://discuss.elastic.co/t/dynamic-mapping/248598/4 "2020-10-13T05:58:08Z")

</div>

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