Class DirectoryTaxonomyReader
  
  A TaxonomyReader which retrieves stored taxonomy information from a
Lucene.Net.Store.Directory.
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
   
  
    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()
    
   
  
  Assembly: Lucene.Net.Facet.dll
  Syntax
  
    public class DirectoryTaxonomyReader : TaxonomyReader, IDisposable
   
  Constructors
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DirectoryTaxonomyReader(DirectoryTaxonomyWriter)
  
  
  Declaration
  
    public DirectoryTaxonomyReader(DirectoryTaxonomyWriter taxoWriter)
   
  Parameters
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DirectoryTaxonomyReader(Directory)
  Open for reading a taxonomy stored in a given Lucene.Net.Store.Directory.
 
  
  Declaration
  
    public DirectoryTaxonomyReader(Directory directory)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | Lucene.Net.Store.Directory | 
        directory | 
        The Lucene.Net.Store.Directory in which the taxonomy resides.  
 | 
      
    
  
  Exceptions
  
    
      
        | Type | 
        Condition | 
      
    
    
      
        | CorruptIndexException | 
        if the Taxonomy is corrupt.  
 | 
      
      
        | System.IO.IOException | 
        if another error occurred.  
 | 
      
    
  
  Properties
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  CommitUserData
  
  
  Declaration
  
    public override IDictionary<string, string> CommitUserData { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.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(IndexWriter)
  Open the Lucene.Net.Index.DirectoryReader from this Lucene.Net.Index.IndexWriter. 
 
  
  Declaration
  
    protected virtual DirectoryReader OpenIndexReader(IndexWriter writer)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | Lucene.Net.Index.IndexWriter | 
        writer | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Lucene.Net.Index.DirectoryReader | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  OpenIndexReader(Directory)
  Open the Lucene.Net.Index.DirectoryReader from this Lucene.Net.Store.Directory. 
 
  
  Declaration
  
    protected virtual DirectoryReader OpenIndexReader(Directory directory)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | Lucene.Net.Store.Directory | 
        directory | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Lucene.Net.Index.DirectoryReader | 
         | 
      
    
  
  
    |
    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 | 
         | 
      
    
  
  Implements
  
      System.IDisposable