org.apache.lucene.index
Class CheckIndex
- java.lang.Object
-
- org.apache.lucene.index.CheckIndex
-
public class CheckIndex extends java.lang.ObjectBasic tool to check the health of an index and write a new segments file that removes reference to problematic segments. There are many more checks that this tool could do but does not yet, eg: reconstructing a segments file by looking for all loadable segments (if no segments file is found), removing specifically specified segments, listing files that exist but are not referenced, etc.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.io.PrintStreamout
-
Constructor Summary
Constructors Constructor and Description CheckIndex()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleancheck(Directory dir, boolean doFix)Returns true if index is clean, else false.static voidmain(java.lang.String[] args)
-
-
-
Method Detail
-
check
public static boolean check(Directory dir, boolean doFix) throws java.io.IOException
Returns true if index is clean, else false.- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
-
DataMelt 3.0 © DataMelt by jWork.ORG