# Weird replication auto altering mapping behavior \[Solved\]

**URL:** <https://discuss.elastic.co/t/weird-replication-auto-altering-mapping-behavior-solved/204638>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [October 22, 2019, 11:44am UTC](https://discuss.elastic.co/t/weird-replication-auto-altering-mapping-behavior-solved/204638 "2019-10-22T11:44:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cedric\_landre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cedric_landre/32/56316_2.png) [@cedric\_landre](https://discuss.elastic.co/u/cedric_landre)\
**Post date:** [October 22, 2019, 11:44am UTC](https://discuss.elastic.co/t/weird-replication-auto-altering-mapping-behavior-solved/204638/1 "2019-10-22T11:44:28Z")

</div>

Hello everyone,

I encoutered a very strange behavior causing query error due to invalid type.  
On a project I create several indexes with the same mapping, but different names

```
    "anSampleOriginalIndex" : {
    "mappings" : {
      "properties" : {
        "action" : {
          "type" : "keyword",
        },
        "device_type" : {
          "type" : "keyword",
        },
    }
}

```

But some indexes found out with this mapping

```
"indexAltered" : {
    "mappings" : {
      "properties" : {
        "action" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "device_type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
    }
}

```

As you can see all my properties became text with a keyword field instead of the original mapping.  
Dynamic mapping is disabled on each index.  
The only difference I notified in kibana' index management page, it's replica for the altered mapping indexes was set to 1.

How come it be possible without dynamic mapping?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![cedric\_landre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cedric_landre/32/56316_2.png) [@cedric\_landre](https://discuss.elastic.co/u/cedric_landre)\
**Post date:** [October 22, 2019, 12:20pm UTC](https://discuss.elastic.co/t/weird-replication-auto-altering-mapping-behavior-solved/204638/2 "2019-10-22T12:20:08Z")

</div>

I reply to my self, i feel very stupid!  
My admin never create this indexes so, it's not about dynamic mapping on index but dynamic index created

---

<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:** [November 19, 2019, 12:20pm UTC](https://discuss.elastic.co/t/weird-replication-auto-altering-mapping-behavior-solved/204638/3 "2019-11-19T12:20:09Z")

</div>

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