Ignore_above setting is not respected

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

Here's the mapping for the field:

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

Please look into it.

I also tried the following mapping but no luck:

        "message": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 20
            }
          }
        },
  • Thank you

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.

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