Class AbstractLuceneBase

  • Direct Known Subclasses:
    AbstractLuceneIndexerImpl

    public abstract class AbstractLuceneBase
    extends Object
    Common support for abstracting the lucene indexer from its configuration and management requirements.

    This class defines where the indexes are stored. This should be via a configurable Bean property in Spring.

    The default file structure is

    1. "base"/"protocol"/"name"/ for the main index
    2. "base"/"protocol"/"name"/deltas/"id" for transactional updates
    3. "base"/"protocol"/"name"/undo/"id" undo information

    The IndexWriter and IndexReader for a given index are toggled (one should be used for delete and the other for write). These are reused/closed/initialised as required.

    The index deltas are buffered to memory and persisted in the file system as required.

    Author:
    Andy Hind