# Dynamic-mapped field changes type after rollover

**URL:** https://discuss.elastic.co/t/dynamic-mapped-field-changes-type-after-rollover/323968
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management, ingest-pipeline, reindex
**Created:** [January 25, 2023, 8:04pm UTC](https://discuss.elastic.co/t/dynamic-mapped-field-changes-type-after-rollover/323968 "2023-01-25T20:04:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![foxy](https://avatars.discourse-cdn.com/v4/letter/f/b5ac83/32.png) [@foxy](https://discuss.elastic.co/u/foxy)
#### Post date: [January 25, 2023, 8:04pm UTC](https://discuss.elastic.co/t/dynamic-mapped-field-changes-type-after-rollover/323968/1 "2023-01-25T20:04:47Z")

</div>

A field in the latest backing index for a data-stream has been mapped to a different type following rollover:

 ![Screenshot from 2023-01-25 19-48-44](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d0495f0af69cb64aa7fccb77e4d8888c35783a86.png)

- Is it possible to re-index the current write index into a new index that would match the index pattern (i.e: from -000004 to -000005)?

- Initially, I tried the following API call:

```json
PUT fox-000004/_mapping
{
  "properties" : {
    "@version" : {
      "type" : "integer"
    } /* [...snip...] */
  }
}

```

```json
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "mapper [@version] cannot be changed from type [keyword] to [integer]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "mapper [@version] cannot be changed from type [keyword] to [integer]"
  },
  "status" : 400
}

```

- How can I find which "supported mapping parameters" can be changed this way? I'm having difficulty wrapping my head around [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/master/properties.html) which seem to imply this is possible, at least some of the time?

- Can I predict this happening for future rollovers?

Thanks for the glance.

---

<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: [February 22, 2023, 8:05pm UTC](https://discuss.elastic.co/t/dynamic-mapped-field-changes-type-after-rollover/323968/2 "2023-02-22T20:05:01Z")

</div>

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