@@ -69,10 +69,10 @@ const configure = {
6969 name : 'hnsw' ,
7070 config : rest
7171 ? {
72- ...rest ,
73- distance : distanceMetric ,
74- type : 'hnsw' ,
75- }
72+ ...rest ,
73+ distance : distanceMetric ,
74+ type : 'hnsw' ,
75+ }
7676 : undefined ,
7777 } ;
7878 } ,
@@ -91,12 +91,12 @@ const configure = {
9191 name : 'dynamic' ,
9292 config : opts
9393 ? {
94- distance : opts . distanceMetric ,
95- threshold : opts . threshold ,
96- hnsw : isModuleConfig ( opts . hnsw ) ? opts . hnsw . config : configure . hnsw ( opts . hnsw ) . config ,
97- flat : isModuleConfig ( opts . flat ) ? opts . flat . config : configure . flat ( opts . flat ) . config ,
98- type : 'dynamic' ,
99- }
94+ distance : opts . distanceMetric ,
95+ threshold : opts . threshold ,
96+ hnsw : isModuleConfig ( opts . hnsw ) ? opts . hnsw . config : configure . hnsw ( opts . hnsw ) . config ,
97+ flat : isModuleConfig ( opts . flat ) ? opts . flat . config : configure . flat ( opts . flat ) . config ,
98+ type : 'dynamic' ,
99+ }
100100 : undefined ,
101101 } ;
102102 } ,
@@ -150,6 +150,11 @@ const configure = {
150150 * Define the quantizer configuration to use when creating a vector index.
151151 */
152152 quantizer : {
153+ /**
154+ * Create an object of type `UncomplressedConfig` to skip default vector quantization.
155+ *
156+ * @returns {BQConfigCreate } The object of type `BQConfigCreate`.
157+ */
153158 none : ( ) : UncompressedConfig => {
154159 return { type : 'none' } ;
155160 } ,
@@ -207,9 +212,9 @@ const configure = {
207212 centroids : options ?. centroids ,
208213 encoder : options ?. encoder
209214 ? {
210- distribution : options . encoder . distribution ,
211- type : options . encoder . type ,
212- }
215+ distribution : options . encoder . distribution ,
216+ type : options . encoder . type ,
217+ }
213218 : undefined ,
214219 segments : options ?. segments ,
215220 trainingLimit : options ?. trainingLimit ,
@@ -344,9 +349,9 @@ const reconfigure = {
344349 encoder :
345350 pqEncoderDistribution || pqEncoderType
346351 ? {
347- distribution : pqEncoderDistribution ,
348- type : pqEncoderType ,
349- }
352+ distribution : pqEncoderDistribution ,
353+ type : pqEncoderType ,
354+ }
350355 : undefined ,
351356 type : 'pq' ,
352357 } ;
0 commit comments