# Remove index mappings in version 7.4

**URL:** <https://discuss.elastic.co/t/remove-index-mappings-in-version-7-4/280636>\
**Category:** Elasticsearch\
**Created:** [August 6, 2021, 9:59am UTC](https://discuss.elastic.co/t/remove-index-mappings-in-version-7-4/280636 "2021-08-06T09:59:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aldm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aldm/32/45644_2.png) [@aldm](https://discuss.elastic.co/u/aldm)\
**Post date:** [August 6, 2021, 9:59am UTC](https://discuss.elastic.co/t/remove-index-mappings-in-version-7-4/280636/1 "2021-08-06T09:59:09Z")

</div>

Hi,

We made a mistake to store details\_per\_category in this way

```auto
{
   cat1: object,
  cat2: object,
 . ..
}

```

Now there are thousands of categories, which generated thousands of new fields in out index. We corrected it by storing details per category in array:

```auto
[
  {
   "category" : catid,
  ...other info (3 fields more) 
  },
 ...
]

```

Unfortunately, now we sometimes run in out of memory on a node because number of fields in index is around 5000.

Can we just remove all those properties from mapping?:

details\_per\_category.cat1, details\_per\_category.cat2 etc

We cleaned up docs and there are no more documents containing this fields. However, when I try to change mapping, to define only this

```auto
{
    "properties": {
        "details_per_category": {
            "properties": {
                "name": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "category_id": {
                    "type": "long"
                },
                .. // 3 more fields
            }
        }
    }
}

```

And execute get mapping after this, it returns me the old fields again.

Is the only solution reindexing data using reindex operation (maybe in combination with alias) or we can change this mapping and lower the value for fields limit on existing index?

Thanks in advance,

Amer

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 6, 2021, 10:28am UTC](https://discuss.elastic.co/t/remove-index-mappings-in-version-7-4/280636/2 "2021-08-06T10:28:12Z")

</div>

There's no other way than creating a new index.

---

<div class="post-metadata">

**Author:** ![aldm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aldm/32/45644_2.png) [@aldm](https://discuss.elastic.co/u/aldm)\
**Post date:** [August 6, 2021, 2:10pm UTC](https://discuss.elastic.co/t/remove-index-mappings-in-version-7-4/280636/3 "2021-08-06T14:10:25Z")

</div>

Thanks. Doing it

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 8, 2021, 11:26pm UTC](https://discuss.elastic.co/t/remove-index-mappings-in-version-7-4/280636/4 "2021-08-08T23:26:40Z")

</div>

Also just wanted to mention 7.4 is [EOL](https://www.elastic.co/support/eol), so please upgrade 🙂

---

<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:** [September 5, 2021, 11:26pm UTC](https://discuss.elastic.co/t/remove-index-mappings-in-version-7-4/280636/5 "2021-09-05T23:26:47Z")

</div>

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