org.apache.lucene.index
Class IndexGate

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

public class IndexGate
extends java.lang.Object

This class allows us to peek at various Lucene internals, not available through public APIs (for good reasons, but inquiring minds want to know ...).

Author:
ab

Nested Class Summary
static class IndexGate.FormatDetails
           
 
Constructor Summary
IndexGate()
           
 
Method Summary
static void deletePendingFiles(org.apache.lucene.store.Directory dir, org.apache.lucene.index.IndexDeletionPolicy policy)
           
static int getCurrentIndexFormat()
           
static java.util.List<java.lang.String> getDeletableFiles(org.apache.lucene.store.Directory dir)
           
static java.lang.String getFileFunction(java.lang.String file)
           
static IndexGate.FormatDetails getFormatDetails(int format)
           
static java.util.List<java.lang.String> getIndexFiles(org.apache.lucene.store.Directory dir)
           
static int getIndexFormat(org.apache.lucene.store.Directory dir)
           
static boolean hasChanges(org.apache.lucene.index.IndexReader ir)
           
static boolean preferCompoundFormat(org.apache.lucene.store.Directory dir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexGate

public IndexGate()
Method Detail

getFileFunction

public static java.lang.String getFileFunction(java.lang.String file)

getIndexFormat

public static int getIndexFormat(org.apache.lucene.store.Directory dir)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getCurrentIndexFormat

public static int getCurrentIndexFormat()

getFormatDetails

public static IndexGate.FormatDetails getFormatDetails(int format)

preferCompoundFormat

public static boolean preferCompoundFormat(org.apache.lucene.store.Directory dir)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

deletePendingFiles

public static void deletePendingFiles(org.apache.lucene.store.Directory dir,
                                      org.apache.lucene.index.IndexDeletionPolicy policy)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getDeletableFiles

public static java.util.List<java.lang.String> getDeletableFiles(org.apache.lucene.store.Directory dir)
                                                          throws java.lang.Exception
Throws:
java.lang.Exception

getIndexFiles

public static java.util.List<java.lang.String> getIndexFiles(org.apache.lucene.store.Directory dir)
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

hasChanges

public static boolean hasChanges(org.apache.lucene.index.IndexReader ir)