final class FSTTermsReader.TermsReader extends Terms implements Accountable
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
FSTTermsReader.TermsReader.BaseTermsEnum |
private class |
FSTTermsReader.TermsReader.IntersectTermsEnum |
private class |
FSTTermsReader.TermsReader.SegmentTermsEnum |
| Modifier and Type | Field and Description |
|---|---|
(package private) FST<FSTTermOutputs.TermData> |
dict |
(package private) int |
docCount |
(package private) FieldInfo |
fieldInfo |
(package private) int |
longsSize |
(package private) long |
numTerms |
(package private) long |
sumDocFreq |
(package private) long |
sumTotalTermFreq |
EMPTY_ARRAY| Constructor and Description |
|---|
TermsReader(FieldInfo fieldInfo,
IndexInput in,
long numTerms,
long sumTotalTermFreq,
long sumDocFreq,
int docCount,
int longsSize) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<Accountable> |
getChildResources()
Returns nested resources of this class.
|
int |
getDocCount()
Returns the number of documents that have at least one
term for this field.
|
long |
getSumDocFreq()
Returns the sum of
TermsEnum.docFreq() for
all terms in this field. |
long |
getSumTotalTermFreq()
Returns the sum of
TermsEnum.totalTermFreq() for
all terms in this field. |
boolean |
hasFreqs()
Returns true if documents in this field store
per-document term frequency (
PostingsEnum.freq()). |
boolean |
hasOffsets()
Returns true if documents in this field store offsets.
|
boolean |
hasPayloads()
Returns true if documents in this field store payloads.
|
boolean |
hasPositions()
Returns true if documents in this field store positions.
|
TermsEnum |
intersect(CompiledAutomaton compiled,
BytesRef startTerm)
Returns a TermsEnum that iterates over all terms and
documents that are accepted by the provided
CompiledAutomaton. |
TermsEnum |
iterator()
Returns an iterator that will step through all
terms.
|
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
long |
size()
Returns the number of terms for this field, or -1 if this
measure isn't stored by the codec.
|
java.lang.String |
toString() |
final FieldInfo fieldInfo
final long numTerms
final long sumTotalTermFreq
final long sumDocFreq
final int docCount
final int longsSize
final FST<FSTTermOutputs.TermData> dict
TermsReader(FieldInfo fieldInfo, IndexInput in, long numTerms, long sumTotalTermFreq, long sumDocFreq, int docCount, int longsSize) throws java.io.IOException
java.io.IOExceptionpublic long ramBytesUsed()
AccountableramBytesUsed in interface Accountablepublic java.util.Collection<Accountable> getChildResources()
AccountablegetChildResources in interface AccountableAccountablespublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean hasFreqs()
TermsPostingsEnum.freq()).public boolean hasOffsets()
TermshasOffsets in class Termspublic boolean hasPositions()
TermshasPositions in class Termspublic boolean hasPayloads()
TermshasPayloads in class Termspublic long size()
Termspublic long getSumTotalTermFreq()
TermsTermsEnum.totalTermFreq() for
all terms in this field. Note that, just like other term
measures, this measure does not take deleted documents
into account.getSumTotalTermFreq in class Termspublic long getSumDocFreq()
throws java.io.IOException
TermsTermsEnum.docFreq() for
all terms in this field. Note that, just like other term
measures, this measure does not take deleted documents
into account.getSumDocFreq in class Termsjava.io.IOExceptionpublic int getDocCount()
throws java.io.IOException
TermsgetDocCount in class Termsjava.io.IOExceptionpublic TermsEnum iterator() throws java.io.IOException
Termspublic TermsEnum intersect(CompiledAutomaton compiled, BytesRef startTerm) throws java.io.IOException
TermsCompiledAutomaton. If the startTerm is
provided then the returned enum will only return terms
> startTerm, but you still must call
next() first to get to the first term. Note that the
provided startTerm must be accepted by
the automaton.
This is an expert low-level API and will only work
for NORMAL compiled automata. To handle any
compiled automata you should instead use
CompiledAutomaton.getTermsEnum(org.apache.lucene.index.Terms) instead.
NOTE: the returned TermsEnum cannot seek
.