# Failed to re-index : field cannot be changed from type \[long\] to \[double\]

**URL:** <https://discuss.elastic.co/t/failed-to-re-index-field-cannot-be-changed-from-type-long-to-double/226174>\
**Category:** Elasticsearch\
**Created:** [April 2, 2020, 8:26am UTC](https://discuss.elastic.co/t/failed-to-re-index-field-cannot-be-changed-from-type-long-to-double/226174 "2020-04-02T08:26:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yamuna\_Mallikarjun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yamuna_mallikarjun/32/46913_2.png) [@Yamuna\_Mallikarjun](https://discuss.elastic.co/u/Yamuna_Mallikarjun)\
**Post date:** [April 2, 2020, 8:26am UTC](https://discuss.elastic.co/t/failed-to-re-index-field-cannot-be-changed-from-type-long-to-double/226174/1 "2020-04-02T08:26:46Z")

</div>

I am trying to reindex from ES version 2.4.1 to ES version 6.6.0.  
I have some 5 indices. out of 5 one index is partially migrated.

**Re-index output:**

````
```
{
"took" : 6207,
"timed_out" : false,
"total" : 50396,
"updated" : 0,
"created" : 999,
"deleted" : 0,
"batches" : 1,
"version_conflicts" : 0,
"noops" : 0,
"retries" : {
"bulk" : 0,
"search" : 0
},
"throttled_millis" : 0,
"requests_per_second" : -1.0,
"throttled_until_millis" : 0,
"failures" : [
{
  "index" : "metrics-2020.04-10",
  "type" : "metric",
  "id" : "AXE2XOGKvo5uCf5dkULy",
  "cause" : {
    "type" : "illegal_argument_exception",
    "reason" : "mapper [p_id] cannot be changed from type [long] to [double]"
  },
  "status" : 400
}
]
}
```

````

**Mapping:**  
Data type for field "p\_id" is "long" in both the versions

Then i tried to reIndex the failed index again, it's succeeded.  
I am wondering why it's failed first time. Can someone please help me to understand this.

Thanks

---

<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:** [April 30, 2020, 8:29am UTC](https://discuss.elastic.co/t/failed-to-re-index-field-cannot-be-changed-from-type-long-to-double/226174/2 "2020-04-30T08:29:30Z")

</div>

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