C# Class Lucene.Net.Index.DocTermOrds

Datei anzeigen Open project: paulirwin/lucene.net Class Usage Examples

Protected Properties

Property Type Description
DocsEnum Lucene.Net.Index.DocsEnum
Field string
Index int[]
IndexedTermsArray BytesRef[]
MaxTermDocFreq int
NumTermsInField int
OrdBase int
Phase1_time int
Prefix BytesRef
SizeOfIndexedStrings long
TermInstances long
Tnums sbyte[][]
Total_time int

Public Methods

Method Description
DocTermOrds ( AtomicReader reader, Bits liveDocs, string field ) : System

Inverts all terms

DocTermOrds ( AtomicReader reader, Bits liveDocs, string field, BytesRef termPrefix ) : System

Inverts only terms starting w/ prefix

DocTermOrds ( AtomicReader reader, Bits liveDocs, string field, BytesRef termPrefix, int maxTermDocFreq ) : System

Inverts only terms starting w/ prefix, and only terms whose docFreq (not taking deletions into account) is <= maxTermDocFreq

DocTermOrds ( AtomicReader reader, Bits liveDocs, string field, BytesRef termPrefix, int maxTermDocFreq, int indexIntervalBits ) : System

Inverts only terms starting w/ prefix, and only terms whose docFreq (not taking deletions into account) is <= maxTermDocFreq, with a custom indexing interval (default is every 128nd term).

GetIterator ( AtomicReader reader ) : Lucene.Net.Index.SortedSetDocValues

Returns a SortedSetDocValues view of this instance

GetOrdTermsEnum ( AtomicReader reader ) : Lucene.Net.Index.TermsEnum

Returns a TermsEnum that implements ord. If the provided reader supports ord, we just return its TermsEnum; if it does not, we build a "private" terms index internally (WARNING: consumes RAM) and use that index to implement ord. this also enables ord on top of a composite reader. The returned TermsEnum is unpositioned. this returns null if there are no terms.

NOTE: you must pass the same reader that was used when creating this class

LookupTerm ( Lucene.Net.Index.TermsEnum termsEnum, int ord ) : BytesRef

Returns the term (BytesRef) corresponding to the provided ordinal.

NumTerms ( ) : int

Returns the number of terms in this field

RamUsedInBytes ( ) : long

Returns total bytes used.

Protected Methods

Method Description
DocTermOrds ( string field, int maxTermDocFreq, int indexIntervalBits ) : System

Subclass inits w/ this, but be sure you then call uninvert, only once

SetActualDocFreq ( int termNum, int df ) : void

Invoked during #uninvert(AtomicReader,Bits,BytesRef) to record the document frequency for each uninverted term.

Uninvert ( AtomicReader reader, Bits liveDocs, BytesRef termPrefix ) : void

Call this only once (if you subclass!)

VisitTerm ( Lucene.Net.Index.TermsEnum te, int termNum ) : void

Subclass can override this

Private Methods

Method Description
VIntSize ( int x ) : int

Number of bytes to represent an unsigned int as a vint.

WriteInt ( int x, sbyte arr, int pos ) : int

Method Details

DocTermOrds() public method

Inverts all terms
public DocTermOrds ( AtomicReader reader, Bits liveDocs, string field ) : System
reader AtomicReader
liveDocs Bits
field string
return System

DocTermOrds() public method

Inverts only terms starting w/ prefix
public DocTermOrds ( AtomicReader reader, Bits liveDocs, string field, BytesRef termPrefix ) : System
reader AtomicReader
liveDocs Bits
field string
termPrefix BytesRef
return System

DocTermOrds() public method

Inverts only terms starting w/ prefix, and only terms whose docFreq (not taking deletions into account) is <= maxTermDocFreq
public DocTermOrds ( AtomicReader reader, Bits liveDocs, string field, BytesRef termPrefix, int maxTermDocFreq ) : System
reader AtomicReader
liveDocs Bits
field string
termPrefix BytesRef
maxTermDocFreq int
return System

DocTermOrds() public method

Inverts only terms starting w/ prefix, and only terms whose docFreq (not taking deletions into account) is <= maxTermDocFreq, with a custom indexing interval (default is every 128nd term).
public DocTermOrds ( AtomicReader reader, Bits liveDocs, string field, BytesRef termPrefix, int maxTermDocFreq, int indexIntervalBits ) : System
reader AtomicReader
liveDocs Bits
field string
termPrefix BytesRef
maxTermDocFreq int
indexIntervalBits int
return System

DocTermOrds() protected method

Subclass inits w/ this, but be sure you then call uninvert, only once
protected DocTermOrds ( string field, int maxTermDocFreq, int indexIntervalBits ) : System
field string
maxTermDocFreq int
indexIntervalBits int
return System

GetIterator() public method

Returns a SortedSetDocValues view of this instance
public GetIterator ( AtomicReader reader ) : Lucene.Net.Index.SortedSetDocValues
reader AtomicReader
return Lucene.Net.Index.SortedSetDocValues

GetOrdTermsEnum() public method

Returns a TermsEnum that implements ord. If the provided reader supports ord, we just return its TermsEnum; if it does not, we build a "private" terms index internally (WARNING: consumes RAM) and use that index to implement ord. this also enables ord on top of a composite reader. The returned TermsEnum is unpositioned. this returns null if there are no terms.

NOTE: you must pass the same reader that was used when creating this class

public GetOrdTermsEnum ( AtomicReader reader ) : Lucene.Net.Index.TermsEnum
reader AtomicReader
return Lucene.Net.Index.TermsEnum

LookupTerm() public method

Returns the term (BytesRef) corresponding to the provided ordinal.
public LookupTerm ( Lucene.Net.Index.TermsEnum termsEnum, int ord ) : BytesRef
termsEnum Lucene.Net.Index.TermsEnum
ord int
return BytesRef

NumTerms() public method

Returns the number of terms in this field
public NumTerms ( ) : int
return int

RamUsedInBytes() public method

Returns total bytes used.
public RamUsedInBytes ( ) : long
return long

SetActualDocFreq() protected method

Invoked during #uninvert(AtomicReader,Bits,BytesRef) to record the document frequency for each uninverted term.
protected SetActualDocFreq ( int termNum, int df ) : void
termNum int
df int
return void

Uninvert() protected method

Call this only once (if you subclass!)
protected Uninvert ( AtomicReader reader, Bits liveDocs, BytesRef termPrefix ) : void
reader AtomicReader
liveDocs Bits
termPrefix BytesRef
return void

VisitTerm() protected method

Subclass can override this
protected VisitTerm ( Lucene.Net.Index.TermsEnum te, int termNum ) : void
te Lucene.Net.Index.TermsEnum
termNum int
return void

Property Details

DocsEnum protected_oe property

Used while uninverting.
protected DocsEnum,Lucene.Net.Index DocsEnum
return Lucene.Net.Index.DocsEnum

Field protected_oe property

Field we are uninverting.
protected string Field
return string

Index protected_oe property

Holds the per-document ords or a pointer to the ords.
protected int[] Index
return int[]

IndexedTermsArray protected_oe property

Holds the indexed (by default every 128th) terms.
protected BytesRef[] IndexedTermsArray
return BytesRef[]

MaxTermDocFreq protected_oe property

Don't uninvert terms that exceed this count.
protected int MaxTermDocFreq
return int

NumTermsInField protected_oe property

Number of terms in the field.
protected int NumTermsInField
return int

OrdBase protected_oe property

Ordinal of the first term in the field, or 0 if the PostingsFormat does not implement {@link TermsEnum#ord}.
protected int OrdBase
return int

Phase1_time protected_oe property

Time for phase1 of the uninvert process.
protected int Phase1_time
return int

Prefix protected_oe property

If non-null, only terms matching this prefix were indexed.
protected BytesRef Prefix
return BytesRef

SizeOfIndexedStrings protected_oe property

Total bytes (sum of term lengths) for all indexed terms.
protected long SizeOfIndexedStrings
return long

TermInstances protected_oe property

Total number of references to term numbers.
protected long TermInstances
return long

Tnums protected_oe property

Holds term ords for documents.
protected sbyte[][] Tnums
return sbyte[][]

Total_time protected_oe property

Total time to uninvert the field.
protected int Total_time
return int