Class Lucene50CompressingTermVectorsReader

    • Constructor Detail

      • Lucene50CompressingTermVectorsReader

        public Lucene50CompressingTermVectorsReader​(Directory d,
                                                    SegmentInfo si,
                                                    java.lang.String segmentSuffix,
                                                    FieldInfos fn,
                                                    IOContext context,
                                                    java.lang.String formatName,
                                                    CompressionMode compressionMode)
                                             throws java.io.IOException
        Sole constructor.
        Throws:
        java.io.IOException
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • get

        public Fields get​(int doc)
                   throws java.io.IOException
        Description copied from class: TermVectors
        Returns term vectors for this document, or null if term vectors were not indexed.

        The returned Fields instance acts like a single-document inverted index (the docID will be 0). If offsets are available they are in an OffsetAttribute available from the PostingsEnum.

        Specified by:
        get in class TermVectors
        Throws:
        java.io.IOException
      • positionIndex

        private int[][] positionIndex​(int skip,
                                      int numFields,
                                      PackedInts.Reader numTerms,
                                      int[] termFreqs)
      • readPositions

        private int[][] readPositions​(int skip,
                                      int numFields,
                                      PackedInts.Reader flags,
                                      PackedInts.Reader numTerms,
                                      int[] termFreqs,
                                      int flag,
                                      int totalPositions,
                                      int[][] positionIndex)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • sum

        private static int sum​(int[] arr)
      • checkIntegrity

        public void checkIntegrity()
                            throws java.io.IOException
        Description copied from class: TermVectorsReader
        Checks consistency of this reader.

        Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.

        Specified by:
        checkIntegrity in class TermVectorsReader
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object