Class Lucene50CompressingTermVectorsFormat
- Direct Known Subclasses:
Lucene50TermVectorsFormat
TermVectorsFormat
that compresses chunks of documents together in order to improve the
compression ratio.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
block sizeprotected final int
chunk sizeprotected final CompressionMode
compression modeprotected final String
format nameprotected final int
max docs per chunkprotected final String
segment suffix -
Constructor Summary
ConstructorDescriptionLucene50CompressingTermVectorsFormat
(String formatName, String segmentSuffix, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockSize) Create a newLucene50CompressingTermVectorsFormat
. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
final TermVectorsReader
vectorsReader
(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) vectorsWriter
(Directory directory, SegmentInfo segmentInfo, IOContext context)
-
Field Details
-
formatName
format name -
segmentSuffix
segment suffix -
compressionMode
compression mode -
chunkSize
protected final int chunkSizechunk size -
blockSize
protected final int blockSizeblock size -
maxDocsPerChunk
protected final int maxDocsPerChunkmax docs per chunk
-
-
Constructor Details
-
Lucene50CompressingTermVectorsFormat
public Lucene50CompressingTermVectorsFormat(String formatName, String segmentSuffix, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockSize) Create a newLucene50CompressingTermVectorsFormat
.formatName
is the name of the format. This name will be used in the file formats to performcodec header checks
.The
compressionMode
parameter allows you to choose between compression algorithms that have various compression and decompression speeds so that you can pick the one that best fits your indexing and searching throughput. You should never instantiate twoLucene50CompressingTermVectorsFormat
s that have the same name but differentCompressionMode
s.chunkSize
is the minimum byte size of a chunk of documents. Higher values ofchunkSize
should improve the compression ratio but will require more memory at indexing time and might make document loading a little slower (depending on the size of your OS cache compared to the size of your index).- Parameters:
formatName
- the name of theStoredFieldsFormat
segmentSuffix
- a suffix to append to files created by this formatcompressionMode
- theCompressionMode
to usechunkSize
- the minimum number of bytes of a single chunk of stored documentsmaxDocsPerChunk
- the maximum number of documents in a single chunkblockSize
- the number of chunks to store in an index block.- See Also:
-
-
Method Details
-
vectorsReader
public final TermVectorsReader vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) throws IOException - Specified by:
vectorsReader
in classTermVectorsFormat
- Throws:
IOException
-
vectorsWriter
public TermVectorsWriter vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context) throws IOException - Specified by:
vectorsWriter
in classTermVectorsFormat
- Throws:
IOException
-
toString
-