org.apache.lucene.index
Class CheckIndex

java.lang.Object
  extended by org.apache.lucene.index.CheckIndex

public class CheckIndex
extends 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 PrintStream out
           
 
Constructor Summary
CheckIndex()
           
 
Method Summary
static boolean check(Directory dir, boolean doFix)
          Returns true if index is clean, else false.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public static PrintStream out
Constructor Detail

CheckIndex

public CheckIndex()
Method Detail

check

public static boolean check(Directory dir,
                            boolean doFix)
                     throws IOException
Returns true if index is clean, else false.

Throws:
IOException

main

public static void main(String[] args)
                 throws Throwable
Throws:
Throwable


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.