How to index large text string data?

Why max_bytes_length_exceeded_exception while insert a doc with some large text field data.. ?

Hi,

A little bit more information would be great !

ES version ?
How is defined you target field ?
How long is the data ?

Regards.

Dominique

1 Like

Can you share your index mapping ?
May be you are trying to index a large text into a term field ?
You can try to change mapping into text or something like this

PUT my-index/_mapping
{
   "properties": {
      "my_field": {
         "type": "keyword",
         "ignore_above": 1024,
         "fields": {
            "raw_text": {
               "type": "text"
            }
         }
      }
   }
}

Thanks ylasri,

Its working .. :+1: