Class CheckIndex
Basic tool and API to check the health of an index and write a new segments file that removes reference to problematic segments.
As this tool checks every byte in the index, on a large index it can take quite a long time to run.
Please make a complete backup of your index before using this to fix your index!
@lucene.experimental
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public class CheckIndex : object
Constructors
Name | Description |
---|---|
CheckIndex(Directory) | Create a new CheckIndex on the directory. |
Properties
Name | Description |
---|---|
CrossCheckTermVectors | If |
InfoStream | Gets or Sets infoStream where messages should go. If null, no
messages are printed. If InfoStreamIsVerbose is |
InfoStreamIsVerbose | If |
Methods
Name | Description |
---|---|
DoCheckIndex() | Returns a CheckIndex.Status instance detailing the state of the index. As this method checks every byte in the index, on a large index it can take quite a long time to run. WARNING: make sure you only call this when the index is not opened by any writer. |
DoCheckIndex(IList<String>) | Returns a CheckIndex.Status instance detailing the state of the index. |
FixIndex(CheckIndex.Status) | Repairs the index using previously returned result from DoCheckIndex(). Note that this does not remove any of the unreferenced files after it's done; you must separately open an IndexWriter, which deletes unreferenced files when it's created. WARNING: this writes a new segments file into the index, effectively removing all documents in broken segments from the index. BE CAREFUL. WARNING: Make sure you only call this when the index is not opened by any writer. |
FlushInfoStream() | |
Main(String[]) | |
TestDocValues(AtomicReader, TextWriter) | Test docvalues. @lucene.experimental |
TestFieldNorms(AtomicReader, TextWriter) | Test field norms. @lucene.experimental |
TestPostings(AtomicReader, TextWriter) | Test the term index. @lucene.experimental |
TestPostings(AtomicReader, TextWriter, Boolean) | Test the term index. @lucene.experimental |
TestStoredFields(AtomicReader, TextWriter) | Test stored fields. @lucene.experimental |
TestTermVectors(AtomicReader, TextWriter) | Test term vectors. @lucene.experimental |
TestTermVectors(AtomicReader, TextWriter, Boolean, Boolean) | Test term vectors. @lucene.experimental |