private class SimpleTextFieldsReader.SimpleTextTerms extends Terms implements Accountable
Modifier and Type | Field and Description |
---|---|
private int |
docCount |
private FieldInfo |
fieldInfo |
private FST<PairOutputs.Pair<java.lang.Long,PairOutputs.Pair<java.lang.Long,java.lang.Long>>> |
fst |
private int |
maxDoc |
private BytesRefBuilder |
scratch |
private CharsRefBuilder |
scratchUTF16 |
private long |
sumDocFreq |
private long |
sumTotalTermFreq |
private int |
termCount |
private long |
termsStart |
EMPTY_ARRAY
Constructor and Description |
---|
SimpleTextTerms(java.lang.String field,
long termsStart,
int maxDoc) |
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 |
iterator()
Returns an iterator that will step through all
terms.
|
private void |
loadTerms() |
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() |
private final long termsStart
private final FieldInfo fieldInfo
private final int maxDoc
private long sumTotalTermFreq
private long sumDocFreq
private int docCount
private FST<PairOutputs.Pair<java.lang.Long,PairOutputs.Pair<java.lang.Long,java.lang.Long>>> fst
private int termCount
private final BytesRefBuilder scratch
private final CharsRefBuilder scratchUTF16
public SimpleTextTerms(java.lang.String field, long termsStart, int maxDoc) throws java.io.IOException
java.io.IOException
private void loadTerms() throws java.io.IOException
java.io.IOException
public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable
public java.util.Collection<Accountable> getChildResources()
Accountable
getChildResources
in interface Accountable
Accountables
public java.lang.String toString()
toString
in class java.lang.Object
public TermsEnum iterator() throws java.io.IOException
Terms
public long size()
Terms
public long getSumTotalTermFreq()
Terms
TermsEnum.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 Terms
public long getSumDocFreq() throws java.io.IOException
Terms
TermsEnum.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 Terms
java.io.IOException
public int getDocCount() throws java.io.IOException
Terms
getDocCount
in class Terms
java.io.IOException
public boolean hasFreqs()
Terms
PostingsEnum.freq()
).public boolean hasOffsets()
Terms
hasOffsets
in class Terms
public boolean hasPositions()
Terms
hasPositions
in class Terms
public boolean hasPayloads()
Terms
hasPayloads
in class Terms