C# Класс Lucene.Net.Codecs.BlockTreeTermsReader

A block-based terms index and dictionary that assigns terms to variable length blocks according to how they share prefixes. The terms index is a prefix trie whose leaves are term blocks. The advantage of this approach is that seekExact is often able to determine a term cannot exist without doing any IO, and intersection with Automata is very fast. Note that this terms dictionary has it's own fixed terms index (ie, it does not support a pluggable terms index implementation).

NOTE: this terms dictionary does not support index divisor when opening an IndexReader. Instead, you can change the min/maxItemsPerBlock during indexing.

The data structure used by this implementation is very similar to a burst trie (http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.3499), but with added logic to break up too-large blocks of all terms sharing a given prefix into smaller ones.

Use Lucene.Net.Index.CheckIndex with the -verbose option to see summary statistics on the blocks in the dictionary. See BlockTreeTermsWriter. @lucene.experimental

Наследование: Lucene.Net.Codecs.FieldsProducer
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
BlockTreeTermsReader ( Directory dir, FieldInfos fieldInfos, SegmentInfo info, Lucene.Net.Codecs.PostingsReaderBase postingsReader, IOContext ioContext, string segmentSuffix, int indexDivisor ) : System

Sole constructor.

CheckIntegrity ( ) : void
Dispose ( ) : void
GetEnumerator ( ) : IEnumerator
RamBytesUsed ( ) : long
Terms ( string field ) : Terms

Защищенные методы

Метод Описание
ReadHeader ( IndexInput input ) : int

Reads terms file header.

ReadIndexHeader ( IndexInput input ) : int

Reads index file header.

SeekDir ( IndexInput input, long dirOffset ) : void

Seek {@code input} to the directory offset.

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

Метод Описание
BrToString ( BytesRef b ) : string
InitializeInstanceFields ( ) : void

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

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

Sole constructor.
public BlockTreeTermsReader ( Directory dir, FieldInfos fieldInfos, SegmentInfo info, Lucene.Net.Codecs.PostingsReaderBase postingsReader, IOContext ioContext, string segmentSuffix, int indexDivisor ) : System
dir Directory
fieldInfos FieldInfos
info SegmentInfo
postingsReader Lucene.Net.Codecs.PostingsReaderBase
ioContext IOContext
segmentSuffix string
indexDivisor int
Результат System

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

public CheckIntegrity ( ) : void
Результат void

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

public Dispose ( ) : void
Результат void

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

public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

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

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

ReadHeader() защищенный Метод

Reads terms file header.
protected ReadHeader ( IndexInput input ) : int
input IndexInput
Результат int

ReadIndexHeader() защищенный Метод

Reads index file header.
protected ReadIndexHeader ( IndexInput input ) : int
input IndexInput
Результат int

SeekDir() защищенный Метод

Seek {@code input} to the directory offset.
protected SeekDir ( IndexInput input, long dirOffset ) : void
input IndexInput
dirOffset long
Результат void

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

public Terms ( string field ) : Terms
field string
Результат Terms