@@ -80,7 +80,10 @@ def vector_index_type() -> VectorIndexType: ...
8080 def _to_dict (self ) -> Dict [str , Any ]:
8181 ret_dict = super ()._to_dict ()
8282 if self .quantizer is not None :
83- ret_dict [self .quantizer .quantizer_name ()] = self .quantizer ._to_dict ()
83+ if isinstance (self .quantizer , _UncompressedConfigCreate ):
84+ ret_dict [self .quantizer .quantizer_name ()] = True
85+ else :
86+ ret_dict [self .quantizer .quantizer_name ()] = self .quantizer ._to_dict ()
8487 if self .distance is not None :
8588 ret_dict ["distance" ] = str (self .distance .value )
8689 if self .multivector is not None and self .multivector .encoding is not None :
@@ -280,6 +283,12 @@ def quantizer_name() -> str:
280283 return "rq"
281284
282285
286+ class _UncompressedConfigCreate (_QuantizerConfigCreate ):
287+ @staticmethod
288+ def quantizer_name () -> str :
289+ return "skipDefaultQuantization"
290+
291+
283292class _PQConfigUpdate (_QuantizerConfigUpdate ):
284293 bitCompression : Optional [bool ] = Field (default = None )
285294 centroids : Optional [int ]
@@ -449,6 +458,11 @@ def rq(
449458 rescoreLimit = rescore_limit ,
450459 )
451460
461+ @staticmethod
462+ def none () -> _UncompressedConfigCreate :
463+ """Create a a vector index without compression."""
464+ return _UncompressedConfigCreate ()
465+
452466
453467class _VectorIndex :
454468 MultiVector = _VectorIndexMultiVector
0 commit comments