# Error in using dynamic mapping: Elasticsearch 6.2

**URL:** <https://discuss.elastic.co/t/error-in-using-dynamic-mapping-elasticsearch-6-2/133699>\
**Category:** Elasticsearch\
**Created:** [May 29, 2018, 2:34pm UTC](https://discuss.elastic.co/t/error-in-using-dynamic-mapping-elasticsearch-6-2/133699 "2018-05-29T14:34:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [May 29, 2018, 9:15pm UTC](https://discuss.elastic.co/t/error-in-using-dynamic-mapping-elasticsearch-6-2/133699/2 "2018-05-29T21:15:56Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

Instead of `string`, use `text`.  
Instead of `"index": "not_analyzed"`, you can either use `keyword` datatype (instead of `text`) or use `"analyzer": "keyword"`.

HTH

---

_[View the full topic](https://discuss.elastic.co/t/error-in-using-dynamic-mapping-elasticsearch-6-2/133699)._
