# Dynamic field detection not works

**URL:** <https://discuss.elastic.co/t/dynamic-field-detection-not-works/214796>\
**Category:** Elasticsearch\
**Created:** [January 13, 2020, 10:34am UTC](https://discuss.elastic.co/t/dynamic-field-detection-not-works/214796 "2020-01-13T10:34:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnkary](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@johnkary](https://discuss.elastic.co/u/johnkary)\
**Post date:** [January 13, 2020, 10:34am UTC](https://discuss.elastic.co/t/dynamic-field-detection-not-works/214796/1 "2020-01-13T10:34:29Z")

</div>

Hi all,  
Here is my my issue about dynamic mapping. I use Elasticsearch 6.6 and have an index with some fields which i have predefined their names and types in the mapping below. Now, if a new field comes to my index i want to automatically be detected its name and datatype, so i used the dynamic field in mapping creation and set it to 'true'. However, it doesn't detect field type when i index a document with a new field 'test3' of type float, just its name only. When i open the mapping of this index in Kibana i see that the new field 'test3' is of type 'text' which is the default.

```
PUT my-index/_mapping/doc
    {
      "dynamic": "true",
      "properties": {
            "test1": {
              "type": "float"
            },
            "test2": {
              "type": "float"
   }
}}

PUT /my-index/doc/2
{ 
  "test1": "5,555",
  "test2": "7,999",
  "test3": "100,25"
}
```

---

<div class="post-metadata">

**Author:** ![johnkary](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@johnkary](https://discuss.elastic.co/u/johnkary)\
**Post date:** [January 13, 2020, 11:19am UTC](https://discuss.elastic.co/t/dynamic-field-detection-not-works/214796/2 "2020-01-13T11:19:35Z")

</div>

Sorry, but by my mistake i used quotes during indexing the new field, so that's why it was created in the mapping as a text datatype. I fixed it and now works. So, i am gonna close the issue.

---

<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 10, 2020, 11:19am UTC](https://discuss.elastic.co/t/dynamic-field-detection-not-works/214796/3 "2020-02-10T11:19:45Z")

</div>

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