# Migration checker showed conflict

**URL:** <https://discuss.elastic.co/t/migration-checker-showed-conflict/33624>\
**Category:** Elasticsearch\
**Created:** [November 3, 2015, 12:12pm UTC](https://discuss.elastic.co/t/migration-checker-showed-conflict/33624 "2015-11-03T12:12:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [November 3, 2015, 12:12pm UTC](https://discuss.elastic.co/t/migration-checker-showed-conflict/33624/1 "2015-11-03T12:12:12Z")

</div>

Hi,  
I ran migration checker to see if I can move from ES 1.7.1 to 2.0 and got many mapping conflicts, one of them is that I have within same index 2 different types each one of them has same field : account and it's mapping is (both fields has exactly same mapping):

_type : string_  
_index : not\_analyzed_  
_store : no_  
_doc\_values : true_

Here the exact mapping (Java) :  
**Type A:**

```
....
.startObject("account") 
	.field("type", "string") 
	.field("index", "not_analyzed") 
	.field("store", "no") 
	.field("doc_values","true")
.endObject() 
....

```

**Type B:**

```
....
.startObject("account") 
	.field("type", "string") 
	.field("index", "not_analyzed") 
	.field("store", "no") 
	.field("doc_values","true")
.endObject()
....

```

They exactly the same, so, I don't see any conflict between two of them, but maybe I'm missing something.  
Any advise ?

Thanks

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [November 3, 2015, 8:45pm UTC](https://discuss.elastic.co/t/migration-checker-showed-conflict/33624/2 "2015-11-03T20:45:30Z")

</div>

Can you post the error you got from the migration checker. I'd also look at `GET /indexname/_mapping`.

---

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [November 3, 2015, 9:58pm UTC](https://discuss.elastic.co/t/migration-checker-showed-conflict/33624/3 "2015-11-03T21:58:48Z")

</div>

Hi,  
Sure this is the error output (partial) :

_Checks completed. The cluster requires action before upgrading._  
_Elasticsearch version: 1.7.1_  
_Index: myindex_  
_Conflicting field mappings_  
_Mapping for field typeb:account conflicts with: typed:account. Check parameters: doc\_values, store_  
_Mapping for field typeb:account conflicts with: typea:account. Check parameters: doc\_values, store_  
_Mapping for field typeb:account conflicts with: typee:account. Check parameters: doc\_values, store_  
_Mapping for field typeb:account conflicts with: typec:account. Check parameters: doc\_values, store_  
_Mapping for field typeb:title conflicts with: typea:title. Check parameter: index_  
_Mapping for field typeb:user conflicts with: typed:user. Check parameters: doc\_values, store_  
_Mapping for field typeb:user conflicts with: typea:user. Check parameters: doc\_values, store_  
_Mapping for field typeb:user conflicts with: typee:user. Check parameters: doc\_values, store_  
_Mapping for field typeb:user conflicts with: typec:user. Check parameters: doc\_values, store_  
_...._

And this is the mapping that gives the error (doc\_values properties are not returned by GET /indexname/\_mapping, but fields account and user are defined with doc\_values true) :

```
{
  "myindex" : {
    "mappings" : {
      "typea" : {
        "_source" : {
          "enabled" : false
        },
        "properties" : {
          "account" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          },
          "title" : {
            "type" : "string",
            "store" : true
          },
          "user" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          }
        }
      },
      "typeb" : {
        "_source" : {
          "enabled" : false
        },
        "properties" : {
          "account" : {
            "type" : "string",
            "index" : "not_analyzed",
            "doc_values" : true
          },
          "title" : {
            "type" : "string",
            "index" : "no",
            "store" : true
          },
          "user" : {
            "type" : "string",
            "index" : "not_analyzed",
            "doc_values" : true
          }
        }
      },
      "typec" : {
        "_source" : {
          "enabled" : false
        },
        "properties" : {
          "account" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          },
          "user" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          }
        }
      },
      "typed" : {
        "_source" : {
          "enabled" : false
        },
        "properties" : {
          "account" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          },
          "user" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          }
        }
      },
      "typee" : {
        "_source" : {
          "enabled" : false
        },
        "properties" : {
          "account" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          },
          "user" : {
            "type" : "string",
            "index" : "not_analyzed",
            "store" : true
          }
        }
      }
    }
  }
}

```

Thanks

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [November 4, 2015, 5:41pm UTC](https://discuss.elastic.co/t/migration-checker-showed-conflict/33624/4 "2015-11-04T17:41:29Z")

</div>

Hi,

The issue is that you have multiple types and typeb.account has doc\_values true where the other types don't. So this is a mapping conflict and needs to be resolved before upgrading. So you'll need to create a new mapping and re-index your data.

---

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [November 4, 2015, 5:56pm UTC](https://discuss.elastic.co/t/migration-checker-showed-conflict/33624/5 "2015-11-04T17:56:03Z")

</div>

Hi,  
Seems that you're right, but interesting that java code for mapping is the same (copy & paste 😄) :

```
.startObject(IndexFields.ACNT.getIndexName()) 
	.field("type", "string") 
	.field("index", "not_analyzed") 
	.field("store", "no")
	.field("doc_values","true")
.endObject() 

```

But only for typeb it has meapping with doc\_values = true, other types are not (somehow).

Thanks, now I have to reindex ☹

---

<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:** [July 5, 2017, 11:40pm UTC](https://discuss.elastic.co/t/migration-checker-showed-conflict/33624/6 "2017-07-05T23:40:31Z")

</div>


