Class CompressingTermVectorsReader

    • Field Detail

      • version

        private final int version
      • packedIntsVersion

        private final int packedIntsVersion
      • chunkSize

        private final int chunkSize
      • numDocs

        private final int numDocs
      • closed

        private boolean closed
      • numDirtyChunks

        private final long numDirtyChunks
      • numDirtyDocs

        private final long numDirtyDocs
      • maxPointer

        private final long maxPointer
    • Constructor Detail

      • CompressingTermVectorsReader

        public CompressingTermVectorsReader​(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

      • getChunkSize

        int getChunkSize()
      • getPackedIntsVersion

        int getPackedIntsVersion()
      • getVersion

        int getVersion()
      • getMaxPointer

        long getMaxPointer()
      • getNumDirtyDocs

        long getNumDirtyDocs()
      • getNumDirtyChunks

        long getNumDirtyChunks()
      • getNumDocs

        int getNumDocs()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • get

        public Fields get​(int doc)
                   throws java.io.IOException
        Description copied from class: TermVectorsReader
        Returns term vectors for this document, or null if term vectors were not indexed. If offsets are available they are in an OffsetAttribute available from the PostingsEnum.
        Specified by:
        get in class TermVectorsReader
        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)
      • ramBytesUsed

        public long ramBytesUsed()
        Description copied from interface: Accountable
        Return the memory usage of this object in bytes. Negative values are illegal.
        Specified by:
        ramBytesUsed in interface Accountable
      • getChildResources

        public java.util.Collection<Accountable> getChildResources()
        Description copied from interface: Accountable
        Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
        Specified by:
        getChildResources in interface Accountable
        See Also:
        Accountables
      • 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