Book Image

Apache Solr High Performance

By : Surendra Mohan
Book Image

Apache Solr High Performance

By: Surendra Mohan

Overview of this book

Table of Contents (14 chapters)

Dealing with the corrupt index


Assume that you are maintaining a Solr instance, and suddenly, probably at late midnight, you are informed that the index is corrupted and you need to investigate and fix the issue at the earliest. Imagine how frustrating it is to address such priority issues, that too at midnight! You might be wondering whether there is an alternative to full indexation or restoring the working index from the backup. Yes, we do have alternatives to full indexation and/or restoring to the backup that won't consume excess time compared to the preceding options, and we will learn how to do it in this section.

Assuming that we have a corrupt index that we need to investigate and fix, we will have to switch the working directory to the one holding Lucene libraries in order to use the CheckIndex tool. On switching to the appropriate directory, run the following command:

java –cp JAR_PATH_LUCENE -ea:org.apache.lucene...org.apache.lucene.index.CheckIndex PATH_INDEX –fix

In the preceding...