|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.codecs.TermsConsumer
public abstract class TermsConsumer
Abstract API that consumes terms for an individual field.
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.
Constructor Summary | |
---|---|
TermsConsumer()
|
Method Summary | |
---|---|
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 Comparator<BytesRef> |
getComparator()
Return the BytesRef Comparator used to sort terms before feeding to this API. |
void |
merge(MergeState mergeState,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TermsConsumer()
Method Detail |
---|
public abstract PostingsConsumer startTerm(BytesRef text) throws IOException
IOException
public abstract void finishTerm(BytesRef text, TermStats stats) throws IOException
IOException
public abstract void finish(long sumTotalTermFreq, long sumDocFreq, int docCount) throws IOException
IOException
public abstract Comparator<BytesRef> getComparator() throws IOException
IOException
public void merge(MergeState mergeState, TermsEnum termsEnum) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |