# Increase "ignore\_above" value for message.keyword

**URL:** <https://discuss.elastic.co/t/increase-ignore-above-value-for-message-keyword/287962>\
**Category:** Elasticsearch\
**Created:** [October 28, 2021, 11:08pm UTC](https://discuss.elastic.co/t/increase-ignore-above-value-for-message-keyword/287962 "2021-10-28T23:08:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![enryoku](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/enryoku/32/94955_2.png) [@enryoku](https://discuss.elastic.co/u/enryoku)\
**Post date:** [October 28, 2021, 11:08pm UTC](https://discuss.elastic.co/t/increase-ignore-above-value-for-message-keyword/287962/1 "2021-10-28T23:08:10Z")

</div>

Hello,

I am trying to increase the default value for "ignore\_above" from 256 to 1024 for the message.keyword field by adding a component index template in Elasticsearch and apply it to the base index pattern.  
My index template:

```auto
{
  "index_templates" : [
    {
      "name" : "test_index",
      "index_template" : {
        "index_patterns" : [
          "test_index*"
        ],
        "composed_of" : [
          "set_message_keyword_to_1024"
        ],
        "priority" : 0
      }
    }
  ]
}

```

The resulting command from creating the index component template is:

```auto
PUT _component_template/set_message_keyword_to_1024
{
  "template": {
    "mappings": {
      "dynamic_templates": [],
      "properties": {
        "message": {
          "eager_global_ordinals": false,
          "index_phrases": false,
          "fielddata": false,
          "norms": true,
          "index": true,
          "store": false,
          "type": "text",
          "index_options": "positions",
          "fields": {
            "keyword": {
              "eager_global_ordinals": false,
              "norms": false,
              "ignore_above": 1024,
              "index": true,
              "store": false,
              "type": "keyword",
              "split_queries_on_whitespace": false,
              "index_options": "docs",
              "doc_values": true
            }
          }
        }
      }
    }
  }
}

```

I was only able to create the component index by uploading the following:

```auto
"properties": {
  "message": {
    "type": "text",
      "fields": {
        "keyword": {
          "type": "keyword",
          "ignore_above": 1024
        }
      }
  }
}

```

I have tried a number of other options which all seem to fail to target the message.keyword field.  
Is this possible?  
I have been posting values in excess of 256 which do not create a message.keyword field, while around 256 characters does create the message.keyword field. I understand this is due to the lucene backend interpreting byte size limitations vs. character count limitations.

I am certain there is a syntax error somewhere here if someone could kindly point it out.

Thanks,

---

<div class="post-metadata">

**Author:** ![enryoku](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/enryoku/32/94955_2.png) [@enryoku](https://discuss.elastic.co/u/enryoku)\
**Post date:** [October 29, 2021, 10:04pm UTC](https://discuss.elastic.co/t/increase-ignore-above-value-for-message-keyword/287962/2 "2021-10-29T22:04:21Z")

</div>

So I fixed my issue by deleting everything again and creating again with the same data, but this time the component template produced a different creation command:

```auto
PUT _component_template/message_keyword_field_increase
{
  "template": {
    "mappings": {
      "dynamic_templates": [],
      "properties": {
        "message": {
          "type": "text",
          "fields": {
            "keyword": {
              "ignore_above": 1536,
              "type": "keyword"
            }
          }
        }
      }
    }
  }
}

```

Not sure what the lesson learned here is other than, just try again?

---

<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:** [November 26, 2021, 10:04pm UTC](https://discuss.elastic.co/t/increase-ignore-above-value-for-message-keyword/287962/3 "2021-11-26T22:04:55Z")

</div>

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