Class HnswCodec
- java.lang.Object
-
- org.apache.lucene.codecs.Codec
-
- org.apache.lucene.codecs.FilterCodec
-
- org.apache.pinot.segment.local.segment.creator.impl.vector.lucene95.HnswCodec
-
- All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI
public class HnswCodec extends org.apache.lucene.codecs.FilterCodecExtend the Lucene 9.5 index format The major change here is to allow custom: @link{org.apache.lucene.codecs.KnnVectorsFormat}- See Also:
package documentation for file format details.
-
-
Constructor Summary
Constructors Constructor Description HnswCodec(org.apache.lucene.codecs.lucene95.Lucene95Codec.Mode mode, org.apache.lucene.codecs.KnnVectorsFormat defaultKnnVectorsFormat)Instantiates a new codec, specifying the stored fields compression mode to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.codecs.DocValuesFormatdocValuesFormat()org.apache.lucene.codecs.DocValuesFormatgetDocValuesFormatForField(String field)Returns the docvalues format that should be used for writing new segments offield.org.apache.lucene.codecs.KnnVectorsFormatgetKnnVectorsFormatForField(String field)Returns the vectors format that should be used for writing new segments offieldorg.apache.lucene.codecs.PostingsFormatgetPostingsFormatForField(String field)Returns the postings format that should be used for writing new segments offield.org.apache.lucene.codecs.KnnVectorsFormatknnVectorsFormat()org.apache.lucene.codecs.PointsFormatpointsFormat()org.apache.lucene.codecs.PostingsFormatpostingsFormat()-
Methods inherited from class org.apache.lucene.codecs.FilterCodec
compoundFormat, fieldInfosFormat, liveDocsFormat, normsFormat, segmentInfoFormat, storedFieldsFormat, termVectorsFormat
-
-
-
-
Constructor Detail
-
HnswCodec
public HnswCodec(org.apache.lucene.codecs.lucene95.Lucene95Codec.Mode mode, org.apache.lucene.codecs.KnnVectorsFormat defaultKnnVectorsFormat)Instantiates a new codec, specifying the stored fields compression mode to use.- Parameters:
mode- stored fields compression mode to use for newly flushed/merged segments.
-
-
Method Detail
-
postingsFormat
public final org.apache.lucene.codecs.PostingsFormat postingsFormat()
- Overrides:
postingsFormatin classorg.apache.lucene.codecs.FilterCodec
-
pointsFormat
public final org.apache.lucene.codecs.PointsFormat pointsFormat()
- Overrides:
pointsFormatin classorg.apache.lucene.codecs.FilterCodec
-
knnVectorsFormat
public final org.apache.lucene.codecs.KnnVectorsFormat knnVectorsFormat()
- Overrides:
knnVectorsFormatin classorg.apache.lucene.codecs.FilterCodec
-
getPostingsFormatForField
public org.apache.lucene.codecs.PostingsFormat getPostingsFormatForField(String field)
Returns the postings format that should be used for writing new segments offield.The default implementation always returns "Lucene90".
WARNING: if you subclass, you are responsible for index backwards compatibility: future version of Lucene are only guaranteed to be able to read the default implementation,
-
getDocValuesFormatForField
public org.apache.lucene.codecs.DocValuesFormat getDocValuesFormatForField(String field)
Returns the docvalues format that should be used for writing new segments offield.The default implementation always returns "Lucene90".
WARNING: if you subclass, you are responsible for index backwards compatibility: future version of Lucene are only guaranteed to be able to read the default implementation.
-
getKnnVectorsFormatForField
public org.apache.lucene.codecs.KnnVectorsFormat getKnnVectorsFormatForField(String field)
Returns the vectors format that should be used for writing new segments offieldThe default implementation always returns "Lucene95".
WARNING: if you subclass, you are responsible for index backwards compatibility: future version of Lucene are only guaranteed to be able to read the default implementation.
-
docValuesFormat
public final org.apache.lucene.codecs.DocValuesFormat docValuesFormat()
- Overrides:
docValuesFormatin classorg.apache.lucene.codecs.FilterCodec
-
-