Class DirectoryTaxonomyReader
A TaxonomyReader which retrieves stored taxonomy information from a
.
Reading from the on-disk index on every method call is too slow, so this
implementation employs caching: Some methods cache recent requests and their
results, while other methods prefetch all the data into memory and then
provide answers directly from in-memory tables. See the documentation of
individual methods for comments on their performance.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
DirectoryTaxonomyReader
Assembly: Lucene.Net.Facet.dll
Syntax
public class DirectoryTaxonomyReader : TaxonomyReader
Constructors
|
Improve this Doc
View Source
DirectoryTaxonomyReader(DirectoryTaxonomyWriter)
Declaration
public DirectoryTaxonomyReader(DirectoryTaxonomyWriter taxoWriter)
Parameters
|
Improve this Doc
View Source
DirectoryTaxonomyReader(Store.Directory)
Open for reading a taxonomy stored in a given .
Declaration
public DirectoryTaxonomyReader(Store.Directory directory)
Parameters
Type |
Name |
Description |
Store.Directory |
directory |
The in which the taxonomy resides.
|
Properties
|
Improve this Doc
View Source
CommitUserData
Declaration
public override IDictionary<string, string> CommitUserData { get; }
Property Value
Type |
Description |
IDictionary<System.String, System.String> |
|
Overrides
|
Improve this Doc
View Source
Count
Declaration
public override int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
ParallelTaxonomyArrays
Declaration
public override ParallelTaxonomyArrays ParallelTaxonomyArrays { get; }
Property Value
Overrides
Methods
|
Improve this Doc
View Source
DoClose()
Declaration
protected override void DoClose()
Overrides
|
Improve this Doc
View Source
DoOpenIfChanged()
Implements the opening of a new DirectoryTaxonomyReader instance if
the taxonomy has changed.
NOTE: the returned DirectoryTaxonomyReader shares the
ordinal and category caches with this reader. This is not expected to cause
any issues, unless the two instances continue to live. The reader
guarantees that the two instances cannot affect each other in terms of
correctness of the caches, however if the size of the cache is changed
through SetCacheSize(Int32), it will affect both reader instances.
Declaration
protected override TaxonomyReader DoOpenIfChanged()
Returns
Overrides
|
Improve this Doc
View Source
GetOrdinal(FacetLabel)
Declaration
public override int GetOrdinal(FacetLabel cp)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
GetPath(Int32)
Declaration
public override FacetLabel GetPath(int ordinal)
Parameters
Type |
Name |
Description |
System.Int32 |
ordinal |
|
Returns
Overrides
|
Improve this Doc
View Source
OpenIndexReader(Index.IndexWriter)
Declaration
protected virtual Index.DirectoryReader OpenIndexReader(Index.IndexWriter writer)
Parameters
Returns
|
Improve this Doc
View Source
OpenIndexReader(Store.Directory)
Declaration
protected virtual Index.DirectoryReader OpenIndexReader(Store.Directory directory)
Parameters
Returns
|
Improve this Doc
View Source
SetCacheSize(Int32)
Declaration
public virtual void SetCacheSize(int size)
Parameters
Type |
Name |
Description |
System.Int32 |
size |
the new maximum cache size, in number of entries.
|
|
Improve this Doc
View Source
ToString(Int32)
Returns ordinal -> label mapping, up to the provided
max ordinal or number of ordinals, whichever is
smaller.
Declaration
public virtual string ToString(int max)
Parameters
Type |
Name |
Description |
System.Int32 |
max |
|
Returns
Type |
Description |
System.String |
|