Java.lang.IllegalArgumentException: cannot change DocValues type from SORTED_SET to BINARY for field "xxxxxxx" can cause node crash /index corruption

[2016-01-09 04:03:29,518][WARN ][index.merge.scheduler ] [es-xxx-11] [xxxxxxxxx][0] failed to merge
java.lang.IllegalArgumentException: cannot change DocValues type from SORTED_SET to BINARY for field "xxxxxxx"
at org.apache.lucene.index.FieldInfos$FieldNumbers.addOrGet(FieldInfos.java:198)
at org.apache.lucene.index.FieldInfos$Builder.addOrUpdateInternal(FieldInfos.java:304)
at org.apache.lucene.index.FieldInfos$Builder.add(FieldInfos.java:332)
at org.apache.lucene.index.SegmentMerger.mergeFieldInfos(SegmentMerger.java:316)
at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:94)
at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4225)
at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3820)
at org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:405)
at org.apache.lucene.index.TrackingConcurrentMergeScheduler.doMerge(TrackingConcurrentMergeScheduler.java:106)
at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:482)
[2016-01-09 04:03:29,549][WARN ][index.engine.internal ] [es-xxx-11] [xxxxxxxx][0] failed engine [merge exception]
[2016-01-09 04:03:29,943][WARN ][cluster.action.shard ] [es-xx-11] [xxxxxxx][0] sending failed shard for [apptivodb5][0], node[QsQBtwkdRMOOqXppaeOUzA], [R], s[STARTED], indexUUID [na], reason [engine failure, message [merge exception][MergeException[java.lang.IllegalArgumentException: cannot change DocValues type from SORTED_SET to BINARY for field "objectStatus"]; nested: IllegalArgumentException[cannot change DocValues type from SORTED_SET to BINARY for field "objectStatus"]; ]]

pls update

Hi can any one answer for the above issue

[quote="justnj, post:1, topic:38873"]
ailed to mergejava.lang.IllegalArgumentException: cannot change DocValues type from SORTED_SET to BINARY
[/quote]ailed to merge
java.lang.IllegalArgumentException: cannot change DocValues type from SORTED_SET to BINARY

when this kind of error occurs and tell us how to counter it

This was happened after delete and update the mapping .
If i try with only update
org.elasticsearch.index.mapper.MergeMappingException: Merge failed with failures {[mapper [objectStatus] of different type, current_type [integer], merged_type [string]]}

after delete and update the mapping .
java.lang.IllegalArgumentException: cannot change DocValues type from SORTED_SET to BINARY

when this kind of error occurs and tell us how to counter it

Most likely in this index you have a conflicting field name across more than one type (same field name, across two different types, with a conflicting mapping).

This has been fixed in 2.0: https://github.com/elastic/elasticsearch/issues/8870

In this case what is the realistic solution , every time the dynamic mapping done and conflicts and same error is occuring . how to avoid this exception/shard failure

cannot change DocValues type from SORTED_SET to BINARY for field "xxxxxxx"

Please consider as with higher severity , since we face this issue in our production

You could name your fields uniquely across different types?

Or, upgrade to ES 2.x where https://github.com/elastic/elasticsearch/issues/8870 will catch invalid mappings before they cause this exception.