public class SearcherTaxonomyManager extends ReferenceManager<SearcherTaxonomyManager.SearcherAndTaxonomy>
NOTE: If you call DirectoryTaxonomyWriter.replaceTaxonomy(org.apache.lucene.store.Directory) then you must
open a new SearcherTaxonomyManager afterwards.
| Modifier and Type | Class and Description |
|---|---|
static class |
SearcherTaxonomyManager.SearcherAndTaxonomy
Holds a matched pair of
IndexSearcher and
TaxonomyReader |
ReferenceManager.RefreshListener| Constructor and Description |
|---|
SearcherTaxonomyManager(Directory indexDir,
Directory taxoDir,
SearcherFactory searcherFactory)
Creates search and taxonomy readers over the corresponding directories.
|
SearcherTaxonomyManager(IndexWriter writer,
boolean applyAllDeletes,
SearcherFactory searcherFactory,
DirectoryTaxonomyWriter taxoWriter)
Creates near-real-time searcher and taxonomy reader
from the corresponding writers.
|
acquire, addListener, close, maybeRefresh, maybeRefreshBlocking, release, removeListenerpublic SearcherTaxonomyManager(IndexWriter writer, boolean applyAllDeletes, SearcherFactory searcherFactory, DirectoryTaxonomyWriter taxoWriter) throws IOException
IOExceptionpublic SearcherTaxonomyManager(Directory indexDir, Directory taxoDir, SearcherFactory searcherFactory) throws IOException
NOTE: you should only use this constructor if you commit and call
ReferenceManager.maybeRefresh() in the same thread. Otherwise it could lead to an
unsync'd IndexSearcher and TaxonomyReader pair.
IOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved