# Recover data from corrupted index

**URL:** <https://discuss.elastic.co/t/recover-data-from-corrupted-index/21276>\
**Category:** Elasticsearch\
**Created:** [December 16, 2014, 3:02pm UTC](https://discuss.elastic.co/t/recover-data-from-corrupted-index/21276 "2014-12-16T15:02:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Octavian](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@Octavian](https://discuss.elastic.co/u/Octavian)\
**Post date:** [December 16, 2014, 3:02pm UTC](https://discuss.elastic.co/t/recover-data-from-corrupted-index/21276/1 "2014-12-16T15:02:52Z")

</div>

Hy,

I have a corrupted index in an elasticsearch cluster. The index is  
corrupted due to bad mappings. As you can see in example, there are two  
fields with same name and different mappings - one is string/doc\_values and  
one is date, and in Lucene this is not possible, due to "doc\_values"  
settings.

{  
"test1": {  
"properties": {  
"date": {  
"format": "dd/MMMM/yyyy: HH: mm: ssZ",  
"type": "date"  
}  
}  
}  
}

{  
"test2": {  
"properties": {  
"date": {  
"index": "not\_analyzed",  
"fielddata": {  
"format": "doc\_values"  
},  
"doc\_values": true  
}  
}  
}  
}

The problem is that I'm not able to start the index in order to reindex the  
data from it. (The error is [WARN][cluster.action.shard] [cluster]  
[index][1] sending failed shard for [index][1],  
node[b2yMUmvXQFy8LFd8ei6DZQ], [P], s[INITIALIZING], indexUUID  
[I\_zoR-4SS02WEfRNKFc6MA], reason [Failed to start shard, message  
[IndexShardGatewayRecoveryException[[index][1] failed recovery]; nested:  
IllegalArgumentException[cannot change DocValues type from BINARY to  
SORTED\_SET for field "date"]; ]]).

Is it possible to somehow recover the data from corrupted index and put it  
in a healthy index ? (I'm using Elasticsearch 1.1.1)

Thank you,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8d3f0501-9fb8-4406-ae82-b85f7f29185a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d3f0501-9fb8-4406-ae82-b85f7f29185a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:43am UTC](https://discuss.elastic.co/t/recover-data-from-corrupted-index/21276/2 "2017-07-06T00:43:27Z")

</div>

Closed on July 6, 2017, 12:43am UTC


