Interface Index.Manager

All Superinterfaces:
AutoCloseable, Closeable, Closeable
Enclosing interface:
Index

public static interface Index.Manager extends Closeable
Management of an Index
  • Method Details

    • getIndex

      @Nonnull Index getIndex()
      Get the current IndexConnection this manager holds. May throw exceptions if the index has not been created.
      Returns:
      the Index this manager refers to
      Throws:
      IllegalStateException - if the index directory is not created etc.
    • openSearcher

      @Nonnull UnmanagedIndexSearcher openSearcher()
      Get the current UnmanagedIndexSearcher from the Index.

      You must call the close method in a finally block once the searcher is no longer needed.

      Returns:
      the current UnmanagedIndexSearcher
    • isIndexCreated

      boolean isIndexCreated()
      Returns true if the index has been created. This means that the index directory itself exists AND has been initialised with the default required index files.
      Returns:
      true if the index exists, false otherwise.
    • deleteIndexDirectory

      void deleteIndexDirectory()
      Clean out the underlying directory the index is contained in.

      Blow away any indexes that currently live there.