This class is based on the IndexFactory abstraction which is a factory to create IndexWriter for the configured Directory. For the execution and the indexation of the corresponding datas, the indexer uses the same IndexWriter. It calls the IndexWriterFactoryUtils class to eventually release it. So the indexer doesn't need to always hold resources during the indexation of every requests and this avoids some locking problems on the index. You can too apply different strategies for managing index resources.
Can be used within a service implementation via direct instantiation with a IndexFactory reference, or get prepared in an application context and given to services as bean reference. Note: The IndexFactory should always be configured as a bean in the application context, in the first case given to the service directly, in the second case to the prepared template. @author Thierry Templier @see org.springmodules.lucene.index.object.AbstractIndexer @see org.springmodules.lucene.index.factory.IndexFactory @see org.springmodules.lucene.index.support.database.SqlDocumentHandler @see org.springmodules.lucene.index.object.database.DatabaseIndexingListener @see org.springmodules.lucene.index.factory.IndexWriterFactoryUtils#getIndexWriter(IndexFactory) @see org.springmodules.lucene.index.factory.IndexWriterFactoryUtils#releaseIndexWriter(IndexFactory,IndexWriter)
|
|