# Mapping use dynamic strict

**URL:** <https://discuss.elastic.co/t/mapping-use-dynamic-strict/264957>\
**Category:** Elasticsearch\
**Created:** [February 20, 2021, 6:31pm UTC](https://discuss.elastic.co/t/mapping-use-dynamic-strict/264957 "2021-02-20T18:31:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 21, 2021, 9:17pm UTC](https://discuss.elastic.co/t/mapping-use-dynamic-strict/264957/4 "2021-02-21T21:17:36Z")

</div>

I suspect you are seeing something similar to [this](https://discuss.elastic.co/t/elastic-stores-string-in-numeric-long-field/264102/6)

How the field is stored is different than how the field is represented in the source document I suspect you are looking at the source document and expecting it to change the type please read the response above and it may help clarify.

Elastic does not cast / correct the source document but it will convert if it can into the actual stored field /doc\_value

So in your case if you set day=123 in the \_source it looks like the integer you entered, but if you looked at the actual doc\_value it would be a string.

And pretty much anything can be a string so it will almost always index a value as a string

---

_[View the full topic](https://discuss.elastic.co/t/mapping-use-dynamic-strict/264957)._
