Ramesh Kotha
Ramesh Kotha

Reputation: 8322

how to solve org.apache.lucene.index.CorruptIndexException error in Apache Solr?

Am using Apache Solr 3.1.0 with Lucene 3.1.0. While indexing server got stopped due to hardware failure. I restarted my server but solr indexing is not happening.

am getting

SEVERE: java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexExceptio n: document count mismatch: deleted docs count 0 vs segment doc count 148 segmen t=_otm

It seems to be a bug in below 3.6 versions reference. But how to upgrade to higher version with out losing the old indexes.

How to solve this. Any body can tell me.

Upvotes: 0

Views: 4323

Answers (2)

Elikill58
Elikill58

Reputation: 4908

The index file are corrupted. Instead of taking lot of time to try to fix them, I simply stopped archiva, then removed all index folder with that command (change folder according to your archiva's installation):

find /var/www/archiva/repositories -type d -name ".indexer" -exec rm -r {} \;

Then, I restarted archiva with bin/archiva console and everything were working again.

All indexes files have been regenerated by maven, and all jar are available again.

Upvotes: 0

mindas
mindas

Reputation: 26703

Upgrading won't fix your problem.

Have a look at CheckIndex class. You can first run checkIndex() method (read-only) which would provide with the status information (CheckIndex.Status) and then you can run fixIndex(CheckIndex.Status status) in order to attempt to fix it. Good luck!

Upvotes: 2

Related Questions