public abstract class TermsConsumer
extends java.lang.Object
The lifecycle is:
FieldsConsumer.addField(FieldInfo).
PostingsConsumer for
each term in startTerm(BytesRef).
finishTerm(BytesRef, TermStats), passing in
the accumulated term statistics.
finish(long, long, int) with
the accumulated collection statistics when it is finished
adding terms to the field.
| Modifier and Type | Method and Description |
|---|---|
abstract void |
finish(long sumTotalTermFreq,
long sumDocFreq,
int docCount)
Called when we are done adding terms to this field.
|
abstract void |
finishTerm(BytesRef text,
TermStats stats)
Finishes the current term; numDocs must be > 0.
|
abstract java.util.Comparator<BytesRef> |
getComparator()
Return the BytesRef Comparator used to sort terms
before feeding to this API.
|
void |
merge(MergeState mergeState,
FieldInfo.IndexOptions indexOptions,
TermsEnum termsEnum)
Default merge impl
|
abstract PostingsConsumer |
startTerm(BytesRef text)
Starts a new term in this field; this may be called
with no corresponding call to finish if the term had
no docs.
|
public abstract PostingsConsumer startTerm(BytesRef text) throws java.io.IOException
java.io.IOExceptionpublic abstract void finishTerm(BytesRef text, TermStats stats) throws java.io.IOException
stats.totalTermFreq will be -1 when term
frequencies are omitted for the field.java.io.IOExceptionpublic abstract void finish(long sumTotalTermFreq,
long sumDocFreq,
int docCount)
throws java.io.IOException
sumTotalTermFreq will be -1 when term
frequencies are omitted for the field.java.io.IOExceptionpublic abstract java.util.Comparator<BytesRef> getComparator() throws java.io.IOException
java.io.IOExceptionpublic void merge(MergeState mergeState, FieldInfo.IndexOptions indexOptions, TermsEnum termsEnum) throws java.io.IOException
java.io.IOExceptionCopyright © 2010 - 2024 Adobe. All Rights Reserved