# Reindex: weird coercing problem

**URL:** <https://discuss.elastic.co/t/reindex-weird-coercing-problem/74091>\
**Category:** Elasticsearch\
**Created:** [February 6, 2017, 4:04pm UTC](https://discuss.elastic.co/t/reindex-weird-coercing-problem/74091 "2017-02-06T16:04:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oranciog](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@oranciog](https://discuss.elastic.co/u/oranciog)\
**Post date:** [February 6, 2017, 4:04pm UTC](https://discuss.elastic.co/t/reindex-weird-coercing-problem/74091/1 "2017-02-06T16:04:28Z")

</div>

Hello!

I want to migrate some documents using remote reindex API from ES 1.x to ES5.1.2 and I have a weird problem:

- **Error** : mapper [field1] of different type, current\_type [keyword], merged\_type [long]
- **Error** : mapper [field2] cannot be changed from type [float] to [long]

The mappings in ES5 cluster are: _{"field1":{"type":"keyword"},"field2":{"type":"float"}}_ and the document that I want to reindex is _{"field1":1,"field2":2}_

Creating a document with exactly the same content using POST API works, but reindex fails.  
I don't have any coerce settings at index level or field level.

Thank you,

---

<div class="post-metadata">

**Author:** ![oranciog](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@oranciog](https://discuss.elastic.co/u/oranciog)\
**Post date:** [February 7, 2017, 9:23am UTC](https://discuss.elastic.co/t/reindex-weird-coercing-problem/74091/2 "2017-02-07T09:23:43Z")

</div>

Anyone?

Thank you

---

<div class="post-metadata">

**Author:** ![oranciog](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@oranciog](https://discuss.elastic.co/u/oranciog)\
**Post date:** [February 7, 2017, 4:08pm UTC](https://discuss.elastic.co/t/reindex-weird-coercing-problem/74091/3 "2017-02-07T16:08:02Z")

</div>

Bump.

It is really important, because otherwise I can't move all the data from one cluster to the other cluster.

Reindex task's response is:  
{..."response":{...  
"failures": [  
{  
"index": "index",  
"type": "default",  
"id": "AU0TIvm5KBq\_GySoOJRi",  
"cause": {  
"type": "illegal\_argument\_exception",  
"reason": "mapper [field1] of different type, current\_type [keyword], merged\_type [long]"  
},  
"status": 400  
},  
{  
"index": "index",  
"type": "default",  
"id": "AU0tz1N8KBq\_GySoDvr9",  
"cause": {  
"type": "illegal\_argument\_exception",  
"reason": "mapper [field2] cannot be changed from type [float] to [long]"  
},  
"status": 400  
}  
]  
}}}

Documents are:

- id: AU0TIvm5KBq\_GySoOJRi: {"field1":1}
- id: AU0tz1N8KBq\_GySoDvr9: {"field2":2}

Reindex request is:  
{  
"waitForCompletion": false,  
"body":{  
"conflicts": "proceed",  
"source": {  
"remote": { "host": "host"},  
"index":"index",  
"size": 1000,  
"type":"default"  
},  
"dest": {  
"index": "index"  
}  
}  
}

Thank you

---

<div class="post-metadata">

**Author:** ![oranciog](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@oranciog](https://discuss.elastic.co/u/oranciog)\
**Post date:** [February 8, 2017, 8:01am UTC](https://discuss.elastic.co/t/reindex-weird-coercing-problem/74091/4 "2017-02-08T08:01:17Z")

</div>

Bump

---

<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:** [March 8, 2017, 8:01am UTC](https://discuss.elastic.co/t/reindex-weird-coercing-problem/74091/5 "2017-03-08T08:01:39Z")

</div>

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