@@ -37,20 +37,20 @@ const makeVectorIndex = (opts?: {
3737 }
3838 conf = conf
3939 ? {
40- ...conf ,
41- multiVector : conf . multiVector
42- ? {
43- ...conf . multiVector ,
44- encoding : conf . multiVector . encoding
45- ? { ...conf . multiVector . encoding , ...opts . encoding }
46- : opts . encoding ,
47- }
48- : vectorIndex . multiVector . multiVector ( { encoding : opts . encoding } ) ,
49- }
40+ ...conf ,
41+ multiVector : conf . multiVector
42+ ? {
43+ ...conf . multiVector ,
44+ encoding : conf . multiVector . encoding
45+ ? { ...conf . multiVector . encoding , ...opts . encoding }
46+ : opts . encoding ,
47+ }
48+ : vectorIndex . multiVector . multiVector ( { encoding : opts . encoding } ) ,
49+ }
5050 : {
51- multiVector : vectorIndex . multiVector . multiVector ( { encoding : opts . encoding } ) ,
52- type : 'hnsw' ,
53- } ;
51+ multiVector : vectorIndex . multiVector . multiVector ( { encoding : opts . encoding } ) ,
52+ type : 'hnsw' ,
53+ } ;
5454 }
5555 if ( opts ?. quantizer ) {
5656 if ( ! conf ) {
@@ -117,8 +117,8 @@ const formatMulti2VecFields = (
117117/** Previously all text-based vectorizers accepted `vectorizeCollectionName` parameter, which was meaningless for some modules and caused others to produce confusing results (see details below). Moving forward, we want to deprecate the usage of this parameter.
118118 *
119119 * Collections with `vectorizeCollectionName: true` generate embeddings even if they have no vectorizeable properties. This means all generated embeddings would embed the collection name itself, which makes them rather meaningless.
120- *
121- * @deprecated Use `vectors` instead.
120+ *
121+ * @deprecated Use `vectors` instead.
122122 * */
123123export const legacyVectors = {
124124 /**
@@ -190,16 +190,16 @@ export const legacyVectors = {
190190 Object . keys ( config ) . length === 0
191191 ? undefined
192192 : {
193- ...config ,
194- audioFields : audioFields ?. map ( ( f ) => f . name ) ,
195- depthFields : depthFields ?. map ( ( f ) => f . name ) ,
196- imageFields : imageFields ?. map ( ( f ) => f . name ) ,
197- IMUFields : IMUFields ?. map ( ( f ) => f . name ) ,
198- textFields : textFields ?. map ( ( f ) => f . name ) ,
199- thermalFields : thermalFields ?. map ( ( f ) => f . name ) ,
200- videoFields : videoFields ?. map ( ( f ) => f . name ) ,
201- weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
202- } ,
193+ ...config ,
194+ audioFields : audioFields ?. map ( ( f ) => f . name ) ,
195+ depthFields : depthFields ?. map ( ( f ) => f . name ) ,
196+ imageFields : imageFields ?. map ( ( f ) => f . name ) ,
197+ IMUFields : IMUFields ?. map ( ( f ) => f . name ) ,
198+ textFields : textFields ?. map ( ( f ) => f . name ) ,
199+ thermalFields : thermalFields ?. map ( ( f ) => f . name ) ,
200+ videoFields : videoFields ?. map ( ( f ) => f . name ) ,
201+ weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
202+ } ,
203203 } ,
204204 } ) ;
205205 } ,
@@ -229,11 +229,11 @@ export const legacyVectors = {
229229 Object . keys ( config ) . length === 0
230230 ? undefined
231231 : {
232- ...config ,
233- imageFields : imageFields ?. map ( ( f ) => f . name ) ,
234- textFields : textFields ?. map ( ( f ) => f . name ) ,
235- weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
236- } ,
232+ ...config ,
233+ imageFields : imageFields ?. map ( ( f ) => f . name ) ,
234+ textFields : textFields ?. map ( ( f ) => f . name ) ,
235+ weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
236+ } ,
237237 } ,
238238 } ) ;
239239 } ,
@@ -263,11 +263,11 @@ export const legacyVectors = {
263263 Object . keys ( config ) . length === 0
264264 ? undefined
265265 : {
266- ...config ,
267- imageFields : imageFields ?. map ( ( f ) => f . name ) ,
268- textFields : textFields ?. map ( ( f ) => f . name ) ,
269- weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
270- } ,
266+ ...config ,
267+ imageFields : imageFields ?. map ( ( f ) => f . name ) ,
268+ textFields : textFields ?. map ( ( f ) => f . name ) ,
269+ weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
270+ } ,
271271 } ,
272272 } ) ;
273273 } ,
@@ -298,11 +298,11 @@ export const legacyVectors = {
298298 Object . keys ( config ) . length === 0
299299 ? undefined
300300 : {
301- ...config ,
302- imageFields : imageFields ?. map ( ( f ) => f . name ) ,
303- textFields : textFields ?. map ( ( f ) => f . name ) ,
304- weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
305- } ,
301+ ...config ,
302+ imageFields : imageFields ?. map ( ( f ) => f . name ) ,
303+ textFields : textFields ?. map ( ( f ) => f . name ) ,
304+ weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
305+ } ,
306306 } ,
307307 } ) ;
308308 } ,
@@ -402,11 +402,11 @@ export const legacyVectors = {
402402 Object . keys ( config ) . length === 0
403403 ? undefined
404404 : {
405- ...config ,
406- imageFields : imageFields ?. map ( ( f ) => f . name ) ,
407- textFields : textFields ?. map ( ( f ) => f . name ) ,
408- weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
409- } ,
405+ ...config ,
406+ imageFields : imageFields ?. map ( ( f ) => f . name ) ,
407+ textFields : textFields ?. map ( ( f ) => f . name ) ,
408+ weights : Object . keys ( weights ) . length === 0 ? undefined : weights ,
409+ } ,
410410 } ,
411411 } ) ;
412412 } ,
0 commit comments