Archive

Archive for the ‘solr’ Category

How to solve org.apache.lucene.index.CorruptIndexException?

February 19, 2013 Leave a comment

If solr server stops while indexing is going on, we may get org.apache.lucene.index.CorruptIndexException error.

To solve this we have to use org.apache.lucene.index.CheckIndex class. We have to run this class to fix the corrupted indexes in solr.

1.  First take back up your indexed data
2.  Go to the directory where lucene-core.3.6.1.jar is there

3. then run this command
java -cp lucene-core-3.1.0.jar -ea:org.apache.lucene… org.apache.lucene.index.CheckIndex “your indexed directory path” –fix
in my case it is
java -cp lucene-core-3.1.0.jar -ea:org.apache.lucene… org.apache.lucene.index.CheckIndex “C:\Program Files\gisgraphy-3.0-beta2\solr\data\index” –fix

corruptedindex

As there are no corrupted indexes in my case it says “No problems were detected with this index”

If there are any corrupted indexes are there then those will be fixed with this command and solr will be working fine.

Categories: Java, solr