Class Lucene90BlockTreeTermsWriter.TermsWriter

    • Constructor Detail

      • TermsWriter

        TermsWriter​(FieldInfo fieldInfo)
    • Method Detail

      • writeBlocks

        void writeBlocks​(int prefixLength,
                         int count)
                  throws java.io.IOException
        Writes the top count entries in pending, using prevTerm to compute the prefix.
        Throws:
        java.io.IOException
      • allEqual

        private boolean allEqual​(byte[] b,
                                 int startOffset,
                                 int endOffset,
                                 byte value)
      • writeBlock

        private Lucene90BlockTreeTermsWriter.PendingBlock writeBlock​(int prefixLength,
                                                                     boolean isFloor,
                                                                     int floorLeadLabel,
                                                                     int start,
                                                                     int end,
                                                                     boolean hasTerms,
                                                                     boolean hasSubBlocks)
                                                              throws java.io.IOException
        Writes the specified slice (start is inclusive, end is exclusive) from pending stack as a new block. If isFloor is true, there were too many (more than maxItemsInBlock) entries sharing the same prefix, and so we broke it into multiple floor blocks where we record the starting label of the suffix of each floor block.
        Throws:
        java.io.IOException
      • write

        public void write​(BytesRef text,
                          TermsEnum termsEnum,
                          NormsProducer norms)
                   throws java.io.IOException
        Writes one term's worth of postings.
        Throws:
        java.io.IOException
      • pushTerm

        private void pushTerm​(BytesRef text)
                       throws java.io.IOException
        Pushes the new term to the top of the stack, and writes new blocks.
        Throws:
        java.io.IOException
      • finish

        public void finish()
                    throws java.io.IOException
        Throws:
        java.io.IOException