# Elasticsearch conversion of string to keyword / text

**URL:** <https://discuss.elastic.co/t/elasticsearch-conversion-of-string-to-keyword-text/199714>\
**Category:** Elasticsearch\
**Created:** [September 16, 2019, 6:57pm UTC](https://discuss.elastic.co/t/elasticsearch-conversion-of-string-to-keyword-text/199714 "2019-09-16T18:57:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deb/32/46162_2.png) [@Deb](https://discuss.elastic.co/u/Deb)\
**Post date:** [September 16, 2019, 6:57pm UTC](https://discuss.elastic.co/t/elasticsearch-conversion-of-string-to-keyword-text/199714/1 "2019-09-16T18:57:05Z")

</div>

Can someone let me know what rules do elasticsearch follows to map a `string` field to `text`/`keyword` when an elasticsearch cluster running 2.3 is upgraded to 5.6.16?

For example how will the below string properties map to text/keyword?

````auto
{
        "properties": {
          "name" : {
            "type" : "string",
            "fields" : {
              "lower" : {
                "type" : "string",
                "analyzer" : "raw_lowercase_analyzer"
              },
              "raw" : {
                "type" : "string",
                "index" : "not_analyzed",
                "ignore_above" : 10922,
                "eager_global_ordinals": true
              }
            }
          }
        }
      }```
````

---

<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 14, 2019, 6:57pm UTC](https://discuss.elastic.co/t/elasticsearch-conversion-of-string-to-keyword-text/199714/2 "2019-10-14T18:57:12Z")

</div>

Closed on October 14, 2019, 6:57pm UTC

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