Class Lucene95CustomStoredFieldsFormat
java.lang.Object
org.apache.lucene.codecs.StoredFieldsFormat
org.opensearch.index.codec.customcodecs.Lucene95CustomStoredFieldsFormat
public class Lucene95CustomStoredFieldsFormat
extends org.apache.lucene.codecs.StoredFieldsFormat
Stored field format used by pluggable codec
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptiondefault constructorLucene95CustomStoredFieldsFormat(org.opensearch.index.codec.customcodecs.Lucene95CustomCodec.Mode mode) Creates a new instance.Lucene95CustomStoredFieldsFormat(org.opensearch.index.codec.customcodecs.Lucene95CustomCodec.Mode mode, int compressionLevel) Creates a new instance with the specified mode and compression level. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.codecs.StoredFieldsReaderfieldsReader(org.apache.lucene.store.Directory directory, SegmentInfo si, FieldInfos fn, org.apache.lucene.store.IOContext context) Returns aStoredFieldsReaderto load stored fields.org.apache.lucene.codecs.StoredFieldsWriterfieldsWriter(org.apache.lucene.store.Directory directory, SegmentInfo si, org.apache.lucene.store.IOContext context) Returns aStoredFieldsReaderto write stored fields.
-
Field Details
-
MODE_KEY
A key that we use to map to a mode
-
-
Constructor Details
-
Lucene95CustomStoredFieldsFormat
public Lucene95CustomStoredFieldsFormat()default constructor -
Lucene95CustomStoredFieldsFormat
public Lucene95CustomStoredFieldsFormat(org.opensearch.index.codec.customcodecs.Lucene95CustomCodec.Mode mode) Creates a new instance.- Parameters:
mode- The mode represents ZSTD or ZSTDNODICT
-
Lucene95CustomStoredFieldsFormat
public Lucene95CustomStoredFieldsFormat(org.opensearch.index.codec.customcodecs.Lucene95CustomCodec.Mode mode, int compressionLevel) Creates a new instance with the specified mode and compression level.- Parameters:
mode- The mode represents ZSTD or ZSTDNODICTcompressionLevel- The compression level for the mode.
-
-
Method Details
-
fieldsReader
public org.apache.lucene.codecs.StoredFieldsReader fieldsReader(org.apache.lucene.store.Directory directory, SegmentInfo si, FieldInfos fn, org.apache.lucene.store.IOContext context) throws IOException Returns aStoredFieldsReaderto load stored fields.- Specified by:
fieldsReaderin classorg.apache.lucene.codecs.StoredFieldsFormat- Parameters:
directory- The index directory.si- The SegmentInfo that stores segment information.fn- The fieldInfos.context- The IOContext that holds additional details on the merge/search context.- Throws:
IOException
-
fieldsWriter
public org.apache.lucene.codecs.StoredFieldsWriter fieldsWriter(org.apache.lucene.store.Directory directory, SegmentInfo si, org.apache.lucene.store.IOContext context) throws IOException Returns aStoredFieldsReaderto write stored fields.- Specified by:
fieldsWriterin classorg.apache.lucene.codecs.StoredFieldsFormat- Parameters:
directory- The index directory.si- The SegmentInfo that stores segment information.context- The IOContext that holds additional details on the merge/search context.- Throws:
IOException
-