# Ignore\_above setting is not respected

**URL:** <https://discuss.elastic.co/t/ignore-above-setting-is-not-respected/237218>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 5:19am UTC](https://discuss.elastic.co/t/ignore-above-setting-is-not-respected/237218 "2020-06-16T05:19:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakesh_b/32/48128_2.png) [@Rakesh\_B](https://discuss.elastic.co/u/Rakesh_B)\
**Post date:** [June 16, 2020, 5:19am UTC](https://discuss.elastic.co/t/ignore-above-setting-is-not-respected/237218/1 "2020-06-16T05:19:22Z")

</div>

Hi,

Setup: `Elasticsearch version 7.6.1`

We are trying to limit the character length of the field `message` to 20 but the setting `ignore_above` is not respected.  
I'm following the documentation here - [https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-above.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-above.html)

Here's the mapping for the field:

```auto
        "message": {
          "type": "keyword",
          "ignore_above": 20
        },

```

As you can see the below in kibana, the field is still indexed and it's value is more than 20:

 ![Screen Shot 2020-06-15 at 10.14.55 PM](https://us1.discourse-cdn.com/elastic/original/3X/a/a/aa6e8d5847cc15c19a51dd0ae467c52f4b118ac8.png)

Please look into it.

I also tried the following mapping but no luck:

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

```

- Thank you

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 16, 2020, 5:21am UTC](https://discuss.elastic.co/t/ignore-above-setting-is-not-respected/237218/2 "2020-06-16T05:21:54Z")

</div>

Elasticsearch does not modify the content of the document, and `ignore_above` only affect how the indexed terms are generated for the keyword subfield. To modify the document and reduce the size of the field you will need to use an ingest pipeline.

---

<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:** [July 14, 2020, 5:22am UTC](https://discuss.elastic.co/t/ignore-above-setting-is-not-respected/237218/3 "2020-07-14T05:22:02Z")

</div>

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