Class TermsConsumer

    • Method Detail

      • startTerm

        public abstract PostingsConsumer startTerm​(BytesRef text)
                                            throws java.io.IOException
        Starts a new term in this field; this may be called with no corresponding call to finish if the term had no docs.
        Throws:
        java.io.IOException
      • finishTerm

        public abstract void finishTerm​(BytesRef text,
                                        TermStats stats)
                                 throws java.io.IOException
        Finishes the current term; numDocs must be > 0. stats.totalTermFreq will be -1 when term frequencies are omitted for the field.
        Throws:
        java.io.IOException
      • finish

        public abstract void finish​(long sumTotalTermFreq,
                                    long sumDocFreq,
                                    int docCount)
                             throws java.io.IOException
        Called when we are done adding terms to this field. sumTotalTermFreq will be -1 when term frequencies are omitted for the field.
        Throws:
        java.io.IOException
      • getComparator

        public abstract java.util.Comparator<BytesRef> getComparator()
                                                              throws java.io.IOException
        Return the BytesRef Comparator used to sort terms before feeding to this API.
        Throws:
        java.io.IOException