Understanding Mutifield limitations for keyword

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?

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.

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?

I don't know.

When I read the documentation 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?

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"
}

Do you have an example which can reproduce the problem? As described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

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

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