Package org.apache.lucene.codecs.memory
Class FSTOrdTermsReader.TermsReader.BaseTermsEnum
- java.lang.Object
-
- org.apache.lucene.index.TermsEnum
-
- org.apache.lucene.index.BaseTermsEnum
-
- org.apache.lucene.codecs.memory.FSTOrdTermsReader.TermsReader.BaseTermsEnum
-
- All Implemented Interfaces:
BytesRefIterator
- Direct Known Subclasses:
FSTOrdTermsReader.TermsReader.IntersectTermsEnum
,FSTOrdTermsReader.TermsReader.SegmentTermsEnum
- Enclosing class:
- FSTOrdTermsReader.TermsReader
abstract class FSTOrdTermsReader.TermsReader.BaseTermsEnum extends BaseTermsEnum
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int[]
bytesLength
(package private) int[]
bytesStart
(package private) int[]
docFreq
(package private) long[][]
longs
(package private) int
metaBlockOrd
(package private) ByteArrayDataInput
metaBytesReader
(package private) ByteArrayDataInput
metaLongsReader
(package private) long
ord
(package private) BlockTermState
state
(package private) int
statsBlockOrd
(package private) ByteArrayDataInput
statsReader
(package private) long[]
totalTermFreq
-
Constructor Summary
Constructors Constructor Description BaseTermsEnum()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
decodeMetaData()
Let PBF decode metadata(package private) void
decodeStats()
Decodes stats data into term stateint
docFreq()
Returns the number of documents containing the current term.ImpactsEnum
impacts(int flags)
Return aImpactsEnum
.long
ord()
Returns ordinal position for current term.PostingsEnum
postings(PostingsEnum reuse, int flags)
GetPostingsEnum
for the current term, with control over whether freqs, positions, offsets or payloads are required.(package private) void
refillMetadata()
Load current metadata shard(package private) void
refillStats()
Load current stats shardvoid
seekExact(long ord)
Seeks to the specified term by ordinal (position) as previously returned byTermsEnum.ord()
.TermState
termState()
Expert: Returns the TermsEnums internal state to position the TermsEnum without re-seeking the term dictionary.long
totalTermFreq()
Returns the total number of occurrences of this term across all documents (the sum of the freq() for each doc that has this term).-
Methods inherited from class org.apache.lucene.index.BaseTermsEnum
attributes, seekExact, seekExact
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.BytesRefIterator
next
-
-
-
-
Field Detail
-
ord
long ord
-
state
final BlockTermState state
-
statsReader
final ByteArrayDataInput statsReader
-
metaLongsReader
final ByteArrayDataInput metaLongsReader
-
metaBytesReader
final ByteArrayDataInput metaBytesReader
-
statsBlockOrd
int statsBlockOrd
-
metaBlockOrd
int metaBlockOrd
-
longs
long[][] longs
-
bytesStart
int[] bytesStart
-
bytesLength
int[] bytesLength
-
docFreq
int[] docFreq
-
totalTermFreq
long[] totalTermFreq
-
-
Method Detail
-
decodeStats
void decodeStats() throws java.io.IOException
Decodes stats data into term state- Throws:
java.io.IOException
-
decodeMetaData
void decodeMetaData() throws java.io.IOException
Let PBF decode metadata- Throws:
java.io.IOException
-
refillStats
final void refillStats() throws java.io.IOException
Load current stats shard- Throws:
java.io.IOException
-
refillMetadata
final void refillMetadata() throws java.io.IOException
Load current metadata shard- Throws:
java.io.IOException
-
termState
public TermState termState() throws java.io.IOException
Description copied from class:TermsEnum
Expert: Returns the TermsEnums internal state to position the TermsEnum without re-seeking the term dictionary.NOTE: A seek by
TermState
might not capture theAttributeSource
's state. Callers must maintain theAttributeSource
states separately- Overrides:
termState
in classBaseTermsEnum
- Throws:
java.io.IOException
- See Also:
TermState
,TermsEnum.seekExact(BytesRef, TermState)
-
docFreq
public int docFreq() throws java.io.IOException
Description copied from class:TermsEnum
Returns the number of documents containing the current term. Do not call this when the enum is unpositioned.TermsEnum.SeekStatus.END
.
-
totalTermFreq
public long totalTermFreq() throws java.io.IOException
Description copied from class:TermsEnum
Returns the total number of occurrences of this term across all documents (the sum of the freq() for each doc that has this term). Note that, like other term measures, this measure does not take deleted documents into account.- Specified by:
totalTermFreq
in classTermsEnum
- Throws:
java.io.IOException
-
postings
public PostingsEnum postings(PostingsEnum reuse, int flags) throws java.io.IOException
Description copied from class:TermsEnum
GetPostingsEnum
for the current term, with control over whether freqs, positions, offsets or payloads are required. Do not call this when the enum is unpositioned. This method will not return null.NOTE: the returned iterator may return deleted documents, so deleted documents have to be checked on top of the
PostingsEnum
.- Specified by:
postings
in classTermsEnum
- Parameters:
reuse
- pass a prior PostingsEnum for possible reuseflags
- specifies which optional per-document values you require; seePostingsEnum.FREQS
- Throws:
java.io.IOException
-
impacts
public ImpactsEnum impacts(int flags) throws java.io.IOException
Description copied from class:TermsEnum
Return aImpactsEnum
.- Specified by:
impacts
in classTermsEnum
- Throws:
java.io.IOException
- See Also:
TermsEnum.postings(PostingsEnum, int)
-
seekExact
public void seekExact(long ord) throws java.io.IOException
Description copied from class:TermsEnum
Seeks to the specified term by ordinal (position) as previously returned byTermsEnum.ord()
. The target ord may be before or after the current ord, and must be within bounds.
-
-