org.apache.lucene.index
Class CheckIndex
java.lang.Object
org.apache.lucene.index.CheckIndex
public class CheckIndex
- extends java.lang.Object
Basic 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 |
static java.io.PrintStream |
out
|
Method Summary |
static boolean |
check(Directory dir,
boolean doFix)
Returns true if index is clean, else false. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
public static java.io.PrintStream out
CheckIndex
public CheckIndex()
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
Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.