Class Lucene50CompressingTermVectorsReader
- java.lang.Object
-
- org.apache.lucene.codecs.TermVectorsReader
-
- org.apache.lucene.backward_codecs.lucene50.compressing.Lucene50CompressingTermVectorsReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Cloneable
public final class Lucene50CompressingTermVectorsReader extends TermVectorsReader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classLucene50CompressingTermVectorsReader.TVFieldsprivate static classLucene50CompressingTermVectorsReader.TVPostingsEnumprivate static classLucene50CompressingTermVectorsReader.TVTermsprivate static classLucene50CompressingTermVectorsReader.TVTermsEnum
-
Field Summary
Fields Modifier and Type Field Description private intchunkSizeprivate booleanclosedprivate CompressionModecompressionModeprivate Decompressordecompressorprivate FieldInfosfieldInfos(package private) static intFLAGS_BITS(package private) FieldsIndexindexReaderprivate longmaxPointer(package private) static intMETA_VERSION_STARTprivate intnumDocs(package private) static intOFFSETS(package private) static intPACKED_BLOCK_SIZEprivate intpackedIntsVersion(package private) static intPAYLOADS(package private) static intPOSITIONSprivate BlockPackedReaderIteratorreader(package private) static java.lang.StringVECTORS_EXTENSION(package private) static java.lang.StringVECTORS_INDEX_CODEC_NAME(package private) static java.lang.StringVECTORS_INDEX_EXTENSION(package private) static java.lang.StringVECTORS_META_EXTENSION(package private) IndexInputvectorsStreamprivate intversion(package private) static intVERSION_CURRENT(package private) static intVERSION_METAVersion where all metadata were moved to the meta file.(package private) static intVERSION_NUM_CHUNKSVersion where numChunks is explicitly recorded in meta file(package private) static intVERSION_OFFHEAP_INDEX(package private) static intVERSION_START
-
Constructor Summary
Constructors Modifier Constructor Description privateLucene50CompressingTermVectorsReader(Lucene50CompressingTermVectorsReader reader)Lucene50CompressingTermVectorsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode)Sole constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckIntegrity()Checks consistency of this reader.TermVectorsReaderclone()Create a clone that one caller at a time may use to read term vectors.voidclose()private voidensureOpen()Fieldsget(int doc)Returns term vectors for this document, or null if term vectors were not indexed.private int[][]positionIndex(int skip, int numFields, PackedInts.Reader numTerms, int[] termFreqs)private int[][]readPositions(int skip, int numFields, PackedInts.Reader flags, PackedInts.Reader numTerms, int[] termFreqs, int flag, int totalPositions, int[][] positionIndex)private static intsum(int[] arr)java.lang.StringtoString()-
Methods inherited from class org.apache.lucene.codecs.TermVectorsReader
getMergeInstance
-
-
-
-
Field Detail
-
VECTORS_EXTENSION
static final java.lang.String VECTORS_EXTENSION
- See Also:
- Constant Field Values
-
VECTORS_INDEX_EXTENSION
static final java.lang.String VECTORS_INDEX_EXTENSION
- See Also:
- Constant Field Values
-
VECTORS_META_EXTENSION
static final java.lang.String VECTORS_META_EXTENSION
- See Also:
- Constant Field Values
-
VECTORS_INDEX_CODEC_NAME
static final java.lang.String VECTORS_INDEX_CODEC_NAME
- See Also:
- Constant Field Values
-
VERSION_START
static final int VERSION_START
- See Also:
- Constant Field Values
-
VERSION_OFFHEAP_INDEX
static final int VERSION_OFFHEAP_INDEX
- See Also:
- Constant Field Values
-
VERSION_META
static final int VERSION_META
Version where all metadata were moved to the meta file.- See Also:
- Constant Field Values
-
VERSION_NUM_CHUNKS
static final int VERSION_NUM_CHUNKS
Version where numChunks is explicitly recorded in meta file- See Also:
- Constant Field Values
-
VERSION_CURRENT
static final int VERSION_CURRENT
- See Also:
- Constant Field Values
-
META_VERSION_START
static final int META_VERSION_START
- See Also:
- Constant Field Values
-
PACKED_BLOCK_SIZE
static final int PACKED_BLOCK_SIZE
- See Also:
- Constant Field Values
-
POSITIONS
static final int POSITIONS
- See Also:
- Constant Field Values
-
OFFSETS
static final int OFFSETS
- See Also:
- Constant Field Values
-
PAYLOADS
static final int PAYLOADS
- See Also:
- Constant Field Values
-
FLAGS_BITS
static final int FLAGS_BITS
-
fieldInfos
private final FieldInfos fieldInfos
-
indexReader
final FieldsIndex indexReader
-
vectorsStream
final IndexInput vectorsStream
-
version
private final int version
-
packedIntsVersion
private final int packedIntsVersion
-
compressionMode
private final CompressionMode compressionMode
-
decompressor
private final Decompressor decompressor
-
chunkSize
private final int chunkSize
-
numDocs
private final int numDocs
-
closed
private boolean closed
-
reader
private final BlockPackedReaderIterator reader
-
maxPointer
private final long maxPointer
-
-
Constructor Detail
-
Lucene50CompressingTermVectorsReader
private Lucene50CompressingTermVectorsReader(Lucene50CompressingTermVectorsReader reader)
-
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
-
ensureOpen
private void ensureOpen() throws AlreadyClosedException- Throws:
AlreadyClosedException- if this TermVectorsReader is closed
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
clone
public TermVectorsReader clone()
Description copied from class:TermVectorsReaderCreate a clone that one caller at a time may use to read term vectors.- Specified by:
clonein classTermVectorsReader
-
get
public Fields get(int doc) throws java.io.IOException
Description copied from class:TermVectorsReaderReturns term vectors for this document, or null if term vectors were not indexed. If offsets are available they are in anOffsetAttributeavailable from thePostingsEnum.- Specified by:
getin classTermVectorsReader- 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.IOExceptionDescription copied from class:TermVectorsReaderChecks 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:
checkIntegrityin classTermVectorsReader- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-