Class SearcherTaxonomyManager
Manages near-real-time reopen of both an IndexSearcher and a TaxonomyReader.
NOTE: If you call ReplaceTaxonomy(Directory) then you must open a new SearcherTaxonomyManager afterwards.
Inheritance
System.Object
SearcherTaxonomyManager
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Facet.Taxonomy
Assembly: Lucene.Net.Facet.dll
Syntax
public class SearcherTaxonomyManager : ReferenceManager<SearcherTaxonomyManager.SearcherAndTaxonomy>, IDisposable
Constructors
| Improve this Doc View SourceSearcherTaxonomyManager(IndexWriter, Boolean, SearcherFactory, DirectoryTaxonomyWriter)
Creates near-real-time searcher and taxonomy reader from the corresponding writers.
Declaration
public SearcherTaxonomyManager(IndexWriter writer, bool applyAllDeletes, SearcherFactory searcherFactory, DirectoryTaxonomyWriter taxoWriter)
Parameters
Type | Name | Description |
---|---|---|
IndexWriter | writer | |
System.Boolean | applyAllDeletes | |
SearcherFactory | searcherFactory | |
DirectoryTaxonomyWriter | taxoWriter |
SearcherTaxonomyManager(Directory, Directory, SearcherFactory)
Creates search and taxonomy readers over the corresponding directories.
NOTE: you should only use this constructor if you commit and call MaybeRefresh() (on the ReaderManager) in the same thread. Otherwise it could lead to an unsync'd IndexSearcher and TaxonomyReader pair.
Declaration
public SearcherTaxonomyManager(Directory indexDir, Directory taxoDir, SearcherFactory searcherFactory)
Parameters
Type | Name | Description |
---|---|---|
Directory | indexDir | |
Directory | taxoDir | |
SearcherFactory | searcherFactory |
Methods
| Improve this Doc View SourceDecRef(SearcherTaxonomyManager.SearcherAndTaxonomy)
Declaration
protected override void DecRef(SearcherTaxonomyManager.SearcherAndTaxonomy ref)
Parameters
Type | Name | Description |
---|---|---|
SearcherTaxonomyManager.SearcherAndTaxonomy | ref |
Overrides
Lucene.Net.Search.ReferenceManager<Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy>.DecRef(Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy)
|
Improve this Doc
View Source
GetRefCount(SearcherTaxonomyManager.SearcherAndTaxonomy)
Declaration
protected override int GetRefCount(SearcherTaxonomyManager.SearcherAndTaxonomy reference)
Parameters
Type | Name | Description |
---|---|---|
SearcherTaxonomyManager.SearcherAndTaxonomy | reference |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Lucene.Net.Search.ReferenceManager<Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy>.GetRefCount(Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy)
|
Improve this Doc
View Source
RefreshIfNeeded(SearcherTaxonomyManager.SearcherAndTaxonomy)
Declaration
protected override SearcherTaxonomyManager.SearcherAndTaxonomy RefreshIfNeeded(SearcherTaxonomyManager.SearcherAndTaxonomy ref)
Parameters
Type | Name | Description |
---|---|---|
SearcherTaxonomyManager.SearcherAndTaxonomy | ref |
Returns
Type | Description |
---|---|
SearcherTaxonomyManager.SearcherAndTaxonomy |
Overrides
Lucene.Net.Search.ReferenceManager<Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy>.RefreshIfNeeded(Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy)
|
Improve this Doc
View Source
TryIncRef(SearcherTaxonomyManager.SearcherAndTaxonomy)
Declaration
protected override bool TryIncRef(SearcherTaxonomyManager.SearcherAndTaxonomy ref)
Parameters
Type | Name | Description |
---|---|---|
SearcherTaxonomyManager.SearcherAndTaxonomy | ref |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Lucene.Net.Search.ReferenceManager<Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy>.TryIncRef(Lucene.Net.Facet.Taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy)
Implements
System.IDisposable