public class SearcherTaxonomyManager
extends <any>
NOTE: If you call DirectoryTaxonomyWriter.replaceTaxonomy(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 |
| Constructor and Description |
|---|
SearcherTaxonomyManager(Directory indexDir,
Directory taxoDir,
SearcherFactory searcherFactory)
Creates search and taxonomy readers over the corresponding directories.
|
SearcherTaxonomyManager(IndexReader reader,
DirectoryTaxonomyReader taxoReader,
SearcherFactory searcherFactory)
Creates this from already opened
IndexReader and DirectoryTaxonomyReader instances. |
SearcherTaxonomyManager(IndexWriter writer,
boolean applyAllDeletes,
SearcherFactory searcherFactory,
DirectoryTaxonomyWriter taxoWriter)
Expert: creates near-real-time searcher and taxonomy reader
from the corresponding writers, controlling whether deletes should be applied.
|
SearcherTaxonomyManager(IndexWriter writer,
SearcherFactory searcherFactory,
DirectoryTaxonomyWriter taxoWriter)
Creates near-real-time searcher and taxonomy reader
from the corresponding writers.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
decRef(SearcherTaxonomyManager.SearcherAndTaxonomy ref) |
protected int |
getRefCount(SearcherTaxonomyManager.SearcherAndTaxonomy reference) |
protected SearcherTaxonomyManager.SearcherAndTaxonomy |
refreshIfNeeded(SearcherTaxonomyManager.SearcherAndTaxonomy ref) |
protected boolean |
tryIncRef(SearcherTaxonomyManager.SearcherAndTaxonomy ref) |
public SearcherTaxonomyManager(IndexWriter writer,
SearcherFactory searcherFactory,
DirectoryTaxonomyWriter taxoWriter)
throws java.io.IOException
java.io.IOExceptionpublic SearcherTaxonomyManager(IndexWriter writer,
boolean applyAllDeletes,
SearcherFactory searcherFactory,
DirectoryTaxonomyWriter taxoWriter)
throws java.io.IOException
java.io.IOExceptionpublic SearcherTaxonomyManager(Directory indexDir,
Directory taxoDir,
SearcherFactory searcherFactory)
throws java.io.IOException
NOTE: you should only use this constructor if you commit and call
#maybeRefresh() in the same thread. Otherwise it could lead to an
unsync'd IndexSearcher and TaxonomyReader pair.
java.io.IOExceptionpublic SearcherTaxonomyManager(IndexReader reader,
DirectoryTaxonomyReader taxoReader,
SearcherFactory searcherFactory)
throws java.io.IOException
IndexReader and DirectoryTaxonomyReader instances. Note that
the incoming readers will be closed when you call #close.java.io.IOExceptionprotected void decRef(SearcherTaxonomyManager.SearcherAndTaxonomy ref) throws java.io.IOException
java.io.IOExceptionprotected boolean tryIncRef(SearcherTaxonomyManager.SearcherAndTaxonomy ref) throws java.io.IOException
java.io.IOExceptionprotected SearcherTaxonomyManager.SearcherAndTaxonomy refreshIfNeeded(SearcherTaxonomyManager.SearcherAndTaxonomy ref) throws java.io.IOException
java.io.IOExceptionprotected int getRefCount(SearcherTaxonomyManager.SearcherAndTaxonomy reference)
Data In Motion GmbH all rights reserved