# How to turn current string field into non-analyzed?

**URL:** <https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563>\
**Category:** Kibana\
**Created:** [July 14, 2016, 7:56pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563 "2016-07-14T19:56:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoplex](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@zoplex](https://discuss.elastic.co/u/zoplex)\
**Post date:** [July 14, 2016, 7:56pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/1 "2016-07-14T19:56:50Z")

</div>

Is there a way to take string field (that is added with 'add\_field' in the mutate section of the logstash filter) and change it into non-analyzed, so it does not break string into words? Either in the logstash filter or on kibana? I don't see setting this in the add\_field as an option ...

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 14, 2016, 8:11pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/2 "2016-07-14T20:11:36Z")

</div>

This is controlled by the Elasticsearch mappings, defined by the index template. You can make a copy of the index template that Logstash installs for you, make the necessary changes to it, and point Logstash to your copy (or upload it to ES yourself and disable Logstash's index template management).

---

<div class="post-metadata">

**Author:** ![zoplex](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@zoplex](https://discuss.elastic.co/u/zoplex)\
**Post date:** [July 14, 2016, 8:50pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/3 "2016-07-14T20:50:23Z")

</div>

ok - thank you for direction.

---

<div class="post-metadata">

**Author:** ![zoplex](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@zoplex](https://discuss.elastic.co/u/zoplex)\
**Post date:** [July 15, 2016, 7:03pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/4 "2016-07-15T19:03:08Z")

</div>

Marcus - I tried creating new template for testing (into new test index) and that worked fine so I can now access .raw field for aggregation in Kibana without being analyzed - but I cannot seem to find the way to list (all) installed templates - and then get them out, modify and update ...

Also I am assuming that if I have index pattern with date stamp - meaning new index gets created every day in this general format: [filebeat-]YYYY.MM.DD (gets created automatically by new data inserts) that I could be able to set the mapping for all upcoming indexes in one command/POST?PUT?

Thanks

---

<div class="post-metadata">

**Author:** ![zoplex](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@zoplex](https://discuss.elastic.co/u/zoplex)\
**Post date:** [July 15, 2016, 7:03pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/5 "2016-07-15T19:03:35Z")

</div>

Kibana 4.5 on es 2.3

---

<div class="post-metadata">

**Author:** ![zoplex](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@zoplex](https://discuss.elastic.co/u/zoplex)\
**Post date:** [July 15, 2016, 8:46pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/6 "2016-07-15T20:46:38Z")

</div>

.. I answered the first part - found the command: curl -X GET 'localhost:9200/\_all/\_mapping?pretty=true' - that works on both 2.3 and 5x-alpha

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 17, 2016, 7:28pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/7 "2016-07-17T19:28:43Z")

</div>

> Also I am assuming that if I have index pattern with date stamp - meaning new index gets created every day in this general format: [filebeat-]YYYY.MM.DD (gets created automatically by new data inserts) that I could be able to set the mapping for all upcoming indexes in one command/POST?PUT?

Yes, that's the point of index templates. They apply to all new indexes whose name matches the one set in the template.

---

<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:** [July 6, 2017, 1:46pm UTC](https://discuss.elastic.co/t/how-to-turn-current-string-field-into-non-analyzed/55563/8 "2017-07-06T13:46:13Z")

</div>


