Class CompressingStoredFieldsFormat
A Stored
For a chunk size of chunkSize
bytes, this Stored231 - chunkSize
)
bytes. In case this is a problem, you should use another format, such as
Lucene40Stored
For optimal performance, you should use a Merge
Inheritance
Namespace: Lucene.Net.Codecs.Compressing
Assembly: Lucene.Net.dll
Syntax
public class CompressingStoredFieldsFormat : StoredFieldsFormat
Constructors
| Improve this Doc View SourceCompressingStoredFieldsFormat(String, CompressionMode, Int32)
Create a new Compressing
Declaration
public CompressingStoredFieldsFormat(string formatName, CompressionMode compressionMode, int chunkSize)
Parameters
Type | Name | Description |
---|---|---|
System. |
formatName | |
Compression |
compressionMode | |
System. |
chunkSize |
See Also
| Improve this Doc View SourceCompressingStoredFieldsFormat(String, String, CompressionMode, Int32)
Create a new Compressing
formatName
is the name of the format. This name will be used
in the file formats to perform
codec header checks (Check
segmentSuffix
is the segment suffix. this suffix is added to
the result file name only if it's not the empty string.
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 two
Compressing
chunkSize
is the minimum byte size of a chunk of documents.
A value of 1
can make sense if there is redundancy across
fields. In that case, both performance and compression ratio should be
better than with Lucene40Stored
Higher values of chunkSize
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).
Declaration
public CompressingStoredFieldsFormat(string formatName, string segmentSuffix, CompressionMode compressionMode, int chunkSize)
Parameters
Type | Name | Description |
---|---|---|
System. |
formatName | The name of the Stored |
System. |
segmentSuffix | |
Compression |
compressionMode | The Compression |
System. |
chunkSize | The minimum number of bytes of a single chunk of stored documents. |
See Also
Methods
| Improve this Doc View SourceFieldsReader(Directory, SegmentInfo, FieldInfos, IOContext)
Declaration
public override StoredFieldsReader FieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
Parameters
Type | Name | Description |
---|---|---|
Directory | directory | |
Segment |
si | |
Field |
fn | |
IOContext | context |
Returns
Type | Description |
---|---|
Stored |
Overrides
| Improve this Doc View SourceFieldsWriter(Directory, SegmentInfo, IOContext)
Declaration
public override StoredFieldsWriter FieldsWriter(Directory directory, SegmentInfo si, IOContext context)
Parameters
Type | Name | Description |
---|---|---|
Directory | directory | |
Segment |
si | |
IOContext | context |
Returns
Type | Description |
---|---|
Stored |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |