C# 클래스 Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader

A TaxonomyReader which retrieves stored taxonomy information from a 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. @lucene.experimental

상속: TaxonomyReader, IDisposable
파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DirectoryTaxonomyReader System
InitTaxoArrays void

공개 메소드들

메소드 설명
DirectoryTaxonomyReader ( Directory directory ) : System

Open for reading a taxonomy stored in a given Directory.

DirectoryTaxonomyReader ( DirectoryTaxonomyWriter taxoWriter ) : System

Opens a DirectoryTaxonomyReader over the given DirectoryTaxonomyWriter (for NRT).

Dispose ( ) : void
GetOrdinal ( FacetLabel cp ) : int
GetPath ( int ordinal ) : FacetLabel
ToString ( int max ) : string

Returns ordinal -> label mapping, up to the provided max ordinal or number of ordinals, whichever is smaller.

보호된 메소드들

메소드 설명
DoClose ( ) : void
DoOpenIfChanged ( ) : TaxonomyReader

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 CacheSize, it will affect both reader instances.

OpenIndexReader ( Directory directory ) : DirectoryReader

Open the DirectoryReader from this Directory.

OpenIndexReader ( IndexWriter writer ) : DirectoryReader

Open the DirectoryReader from this IndexWriter.

비공개 메소드들

메소드 설명
DirectoryTaxonomyReader ( DirectoryReader indexReader, DirectoryTaxonomyWriter taxoWriter, IntClass>.LRUHashMap ordinalCache, FacetLabel>.LRUHashMap categoryCache, TaxonomyIndexArrays taxoArrays ) : System

Called only from DoOpenIfChanged(). If the taxonomy has been recreated, you should pass null as the caches and parent/children arrays.

InitTaxoArrays ( ) : void

메소드 상세

DirectoryTaxonomyReader() 공개 메소드

Open for reading a taxonomy stored in a given Directory.
if the Taxonomy is corrupt. if another error occurred.
public DirectoryTaxonomyReader ( Directory directory ) : System
directory System.IO.Directory The in which the taxonomy resides.
리턴 System

DirectoryTaxonomyReader() 공개 메소드

Opens a DirectoryTaxonomyReader over the given DirectoryTaxonomyWriter (for NRT).
public DirectoryTaxonomyReader ( DirectoryTaxonomyWriter taxoWriter ) : System
taxoWriter DirectoryTaxonomyWriter /// The from which to obtain newly /// added categories, in real-time.
리턴 System

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

DoClose() 보호된 메소드

protected DoClose ( ) : void
리턴 void

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 CacheSize, it will affect both reader instances.

protected DoOpenIfChanged ( ) : TaxonomyReader
리턴 TaxonomyReader

GetOrdinal() 공개 메소드

public GetOrdinal ( FacetLabel cp ) : int
cp FacetLabel
리턴 int

GetPath() 공개 메소드

public GetPath ( int ordinal ) : FacetLabel
ordinal int
리턴 FacetLabel

OpenIndexReader() 보호된 메소드

Open the DirectoryReader from this Directory.
protected OpenIndexReader ( Directory directory ) : DirectoryReader
directory System.IO.Directory
리턴 DirectoryReader

OpenIndexReader() 보호된 메소드

Open the DirectoryReader from this IndexWriter.
protected OpenIndexReader ( IndexWriter writer ) : DirectoryReader
writer IndexWriter
리턴 DirectoryReader

ToString() 공개 메소드

Returns ordinal -> label mapping, up to the provided max ordinal or number of ordinals, whichever is smaller.
public ToString ( int max ) : string
max int
리턴 string