Class DefaultIndexEngine

java.lang.Object
com.atlassian.jira.index.DefaultIndexEngine
All Implemented Interfaces:
Closeable, Closeable, AutoCloseable

@ThreadSafe public class DefaultIndexEngine extends Object
Thread-safe container that manages our current IndexSearcher and Writer.

Gets passed searcher and writer factories that create new instances of these when required.

getSearcher() - returns an IndexSearcher with a frozen view of the current index; the client is responsible for closing the IndexSearcher when finished. IndexSearcher are shared between clients. getSearcher() creates a new IndexSearcher only if there was some changes on the index.

Clients which received a UnmanagedIndexSearcher via getSearcher() are responsible for closing it via UnmanagedIndexSearcher.close().

  • Method Details