C# Класс Lucene.Net.Facet.Taxonomy.CachedOrdinalsReader

A per-segment cache of documents' facet ordinals. Every CachedOrds holds the ordinals in a raw {@code int[]}, and therefore consumes as much RAM as the total number of ordinals found in the segment, but saves the CPU cost of decoding ordinals during facet counting.

NOTE: every CachedOrds is limited to 2.1B total ordinals. If that is a limitation for you then consider limiting the segment size to fewer documents, or use an alternative cache which pages through the category ordinals.

NOTE: when using this cache, it is advised to use a DocValuesFormat that does not cache the data in memory, at least for the category lists fields, or otherwise you'll be doing double-caching.

NOTE: create one instance of this and re-use it for all facet implementations (the cache is per-instance, not static).

Наследование: Lucene.Net.Facet.Taxonomy.OrdinalsReader, Accountable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CachedOrdinalsReader ( Lucene.Net.Facet.Taxonomy.OrdinalsReader source ) : Lucene.Net.Support

Sole constructor.

GetReader ( AtomicReaderContext context ) : OrdinalsSegmentReader
RamBytesUsed ( ) : long

Приватные методы

Метод Описание
GetCachedOrds ( AtomicReaderContext context ) : CachedOrds

Описание методов

CachedOrdinalsReader() публичный Метод

Sole constructor.
public CachedOrdinalsReader ( Lucene.Net.Facet.Taxonomy.OrdinalsReader source ) : Lucene.Net.Support
source Lucene.Net.Facet.Taxonomy.OrdinalsReader
Результат Lucene.Net.Support

GetReader() публичный Метод

public GetReader ( AtomicReaderContext context ) : OrdinalsSegmentReader
context AtomicReaderContext
Результат OrdinalsSegmentReader

RamBytesUsed() публичный Метод

public RamBytesUsed ( ) : long
Результат long