# How to reindex after updating a field's ignore\_above attribute

**URL:** <https://discuss.elastic.co/t/how-to-reindex-after-updating-a-fields-ignore-above-attribute/254964>\
**Category:** Elasticsearch\
**Created:** [November 10, 2020, 6:59pm UTC](https://discuss.elastic.co/t/how-to-reindex-after-updating-a-fields-ignore-above-attribute/254964 "2020-11-10T18:59:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pheathers](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pheathers](https://discuss.elastic.co/u/pheathers)\
**Post date:** [November 10, 2020, 6:59pm UTC](https://discuss.elastic.co/t/how-to-reindex-after-updating-a-fields-ignore-above-attribute/254964/1 "2020-11-10T18:59:09Z")

</div>

Hi.

I have an index created using dynamic mapping with a field set to the default [ignore\_above](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/ignore-above.html) value of 256. I realized that the length is not nearly as high as I would need since the field can have stack traces.

I updated the field using the following syntax ...

```auto
PUT /dclogstash-2020.11.04
{
  "mappings": {
    "properties": {
        "Message": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 3000
          }
        }
      }
    }
  }
}

```

Now that the field is updated, it is my understanding that only new messages will be indexed accordingly, but I need all of the messages currently in the index to respect the update.

My question is how do I re-index my index to take advantage of the updated Keyword length?

Thanks.

---

<div class="post-metadata">

**Author:** ![pheathers](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pheathers](https://discuss.elastic.co/u/pheathers)\
**Post date:** [November 10, 2020, 8:28pm UTC](https://discuss.elastic.co/t/how-to-reindex-after-updating-a-fields-ignore-above-attribute/254964/2 "2020-11-10T20:28:01Z")

</div>

I see that there is a [reindex api](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html), but I was hoping to reindex in place instead of creating a new index.

---

<div class="post-metadata">

**Author:** ![pheathers](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pheathers](https://discuss.elastic.co/u/pheathers)\
**Post date:** [November 10, 2020, 8:47pm UTC](https://discuss.elastic.co/t/how-to-reindex-after-updating-a-fields-ignore-above-attribute/254964/3 "2020-11-10T20:47:21Z")

</div>

I did a bit more testing and it appears that you can use the [Update By Query](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html) command without a document in order to update all documents.

```auto
POST dclogstash-2020.11.04/_update_by_query?conflicts=proceed

```

I'm curious if this is the best way to go about updating the documents in the index. It appears that these documents are not versioned and therefore consume a considerable amount more space.

---

<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:** [December 8, 2020, 8:47pm UTC](https://discuss.elastic.co/t/how-to-reindex-after-updating-a-fields-ignore-above-attribute/254964/4 "2020-12-08T20:47:27Z")

</div>

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