Codec mismatch exception while using checkindex of solr

738 views Asked by At

I am using checkindex command to fix a corrupted core

Command is as follows:

java -cp lucene-core-4.3.0.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /opt/solr/cores/necc_db/index.20141215164500013


ERROR: could not read any segments file in directory
org.apache.lucene.index.CorruptIndexException: codec mismatch: actual codec=Lucene41NormsMetadata vs expected codec=segments (resource: ChecksumIndexInput(MMapIndexInput(path="/opt/solr/cores/necc_db/index.20141215164500013/segments_vilq")))
    at org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:140)
    at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:290)
    at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:347)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:783)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:630)
    at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:343)
    at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:382)
    at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:1854)

How to avoid this exception? Is it possible to solve this?

I have used lucene-core-4.2.0 as well but same error

0

There are 0 answers