# Conflicting field mapping

**URL:** <https://discuss.elastic.co/t/conflicting-field-mapping/63787>\
**Category:** Elasticsearch\
**Created:** [October 24, 2016, 6:10pm UTC](https://discuss.elastic.co/t/conflicting-field-mapping/63787 "2016-10-24T18:10:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [October 24, 2016, 6:10pm UTC](https://discuss.elastic.co/t/conflicting-field-mapping/63787/1 "2016-10-24T18:10:00Z")

</div>

I am trying to upgrade from 1.7.1 and 2.x and the migration took is showing some errors

Index: .kibana  
Conflicting field mappings  
Mapping for field dashboard:hits conflicts with: search:hits. Check parameter: type  
Boolean fields  
Boolean fields will return 1/0 instead of T/F in scripts, aggregations, or sort values, in field: dashboard:timeRestore

"dashboard" : {  
"properties" : {  
"description" : {  
"type" : "string"  
},  
"hits" : {  
"type" : "long"

```
 "hits" : {
        "type" : "integer"
      },

```

I tried to export the objects and re-import but it did not work.  
Please help

---

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [October 24, 2016, 7:44pm UTC](https://discuss.elastic.co/t/conflicting-field-mapping/63787/2 "2016-10-24T19:44:28Z")

</div>

here is the kibana index mapping:  
{  
".kibana" : {  
"aliases" : { },  
"mappings" : {  
"config" : {  
"properties" : {  
"buildNum" : {  
"type" : "long"  
},  
"defaultIndex" : {  
"type" : "string"  
}  
}  
},  
"index-pattern" : {  
"properties" : {  
"customFormats" : {  
"type" : "string"  
},  
"fieldFormatMap" : {  
"type" : "string"  
},  
"fields" : {  
"type" : "string"  
},  
"intervalName" : {  
"type" : "string"  
},  
"timeFieldName" : {  
"type" : "string"  
},  
"title" : {  
"type" : "string"  
}  
}  
},  
"dashboard" : {  
"properties" : {  
"description" : {  
"type" : "string"  
},  
"hits" : {  
"type" : "long"  
},  
"kibanaSavedObjectMeta" : {  
"properties" : {  
"searchSourceJSON" : {  
"type" : "string"  
}  
}  
},  
"panelsJSON" : {  
"type" : "string"  
},  
"timeFrom" : {  
"type" : "string"  
},  
"timeRestore" : {  
"type" : "boolean"  
},  
"timeTo" : {  
"type" : "string"  
},  
"title" : {  
"type" : "string"  
},  
"version" : {  
"type" : "long"  
}  
}  
},  
"visualization" : {  
"properties" : {  
"description" : {  
"type" : "string"  
},  
"kibanaSavedObjectMeta" : {  
"properties" : {  
"searchSourceJSON" : {  
"type" : "string"  
}  
}  
},  
"title" : {  
"type" : "string"  
},  
"version" : {  
"type" : "long"  
},  
"visState" : {  
"type" : "string"  
}  
}  
},  
"search" : {  
"properties" : {  
"columns" : {  
"type" : "string"  
},  
"description" : {  
"type" : "string"  
},  
"hits" : {  
"type" : "integer"  
},  
"kibanaSavedObjectMeta" : {  
"properties" : {  
"searchSourceJSON" : {  
"type" : "string"  
}  
}  
},  
"title" : {  
"type" : "string"  
}  
}  
}  
},  
"settings" : {  
"index" : {  
"routing" : {  
"allocation" : {  
"disable\_allocation" : "false"  
}  
},  
"creation\_date" : "",  
"number\_of\_shards" : "1",  
"uuid" : "",  
"version" : {  
"created" : ""  
},  
"number\_of\_replicas" : "1"  
}  
},  
"warmers" : { }  
}  
}

---

<div class="post-metadata">

**Author:** ![stevenmwall](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevenmwall/32/12199_2.png) [@stevenmwall](https://discuss.elastic.co/u/stevenmwall)\
**Post date:** [October 24, 2016, 8:01pm UTC](https://discuss.elastic.co/t/conflicting-field-mapping/63787/3 "2016-10-24T20:01:23Z")

</div>

I believe the issues is your dashboard hits field is defined with type of long, but your search hits field is defined with a type of integer. In 2.x, fields with the same name in the same index (which is your case) can not have different types.

See: [https://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-put-mapping.html#merging-conflicts](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-put-mapping.html#merging-conflicts)

---

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [October 24, 2016, 8:15pm UTC](https://discuss.elastic.co/t/conflicting-field-mapping/63787/4 "2016-10-24T20:15:40Z")

</div>

Hi Steve  
I should be able to do something like this?  
curl -XPUT .kibana/\_mapping/hits?update\_all\_types  
{  
"properties" : {  
"columns" : {  
"type" : "string"  
},  
"description" : {  
"type" : "string"  
},  
"hits" : {  
"type" : "long"  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [October 25, 2016, 5:10pm UTC](https://discuss.elastic.co/t/conflicting-field-mapping/63787/5 "2016-10-25T17:10:38Z")

</div>

What am I doing wrong?  
curl -XPUT [http://localhost:9200/.kibana/\_mapping/hits?update\_all\_types](http://localhost:9200/.kibana/_mapping/hits?update_all_types)  
{  
"properties" : {  
"hits" : {  
"type" : "long"  
}  
}  
}

---

<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, 10:09pm UTC](https://discuss.elastic.co/t/conflicting-field-mapping/63787/6 "2017-07-05T22:09:54Z")

</div>


