# Understanding Mutifield limitations for keyword

**URL:** <https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052>\
**Category:** Elasticsearch\
**Created:** [March 13, 2019, 3:43am UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052 "2019-03-13T03:43:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kguruprasadh](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@kguruprasadh](https://discuss.elastic.co/u/kguruprasadh)\
**Post date:** [March 13, 2019, 3:43am UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/1 "2019-03-13T03:43:14Z")

</div>

I understand keyword has a limitation of 32766 bytes. But would just like to understand how this will behave in case of multi fields like this below:

```
"properties": {
      "address": {
        "fields": {
          "raw": {
            "type": "keyword"
          }
        },
        "type": "text"
      }

```

Will the keyword have restriction here as well? Also the above way of indexing - will it have any impact during indexing time?

---

<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:** [March 18, 2019, 12:10pm UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/2 "2019-03-18T12:10:19Z")

</div>

The limit you mentioned only applies to `keyword` datatype I believe. Unless your text does not have any space, when using `text` datatype the text is broken in several tokens.

---

<div class="post-metadata">

**Author:** ![kguruprasadh](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@kguruprasadh](https://discuss.elastic.co/u/kguruprasadh)\
**Post date:** [March 18, 2019, 12:36pm UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/3 "2019-03-18T12:36:30Z")

</div>

Thanks for the reply. Does this mean if I give a text exceeding 32766 bytes, then the subtype raw given in the above mapping will be ignored and basically there will be only one indexing happening instead of two that is supposed to happen?

---

<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:** [March 18, 2019, 1:00pm UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/4 "2019-03-18T13:00:52Z")

</div>

I don't know.

When I read [the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html) about keyword type, it says that by default content with more than `2147483647` characters will be ignored.

What is the problem you want to solve?

---

<div class="post-metadata">

**Author:** ![kguruprasadh](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@kguruprasadh](https://discuss.elastic.co/u/kguruprasadh)\
**Post date:** [March 18, 2019, 1:21pm UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/5 "2019-03-18T13:21:23Z")

</div>

Am trying to migrate text fields to keyword as I do not require any analysis on my data. While doing so getting error that value of the keyword field cannot exceed 32766 bytes. But when a multifield raw keyword is added as in the mapping shown above I don't get any errors during indexing.

Basically I want to migrate to the below format:  
"properties": {  
"address": {  
"type": "keyword"  
}

---

<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:** [March 18, 2019, 1:33pm UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/6 "2019-03-18T13:33:28Z")

</div>

Do you have an example which can reproduce the problem? As described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

---

<div class="post-metadata">

**Author:** ![kguruprasadh](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@kguruprasadh](https://discuss.elastic.co/u/kguruprasadh)\
**Post date:** [March 18, 2019, 2:09pm UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/7 "2019-03-18T14:09:29Z")

</div>

Not able to quote an example as it is very random from the huge set of data and the logging is a bit weird. Shall get one soon and post

---

<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:** [April 15, 2019, 2:09pm UTC](https://discuss.elastic.co/t/understanding-mutifield-limitations-for-keyword/172052/8 "2019-04-15T14:09:33Z")

</div>

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