11import {
2+ ConfigureNonTextVectorizerOptions ,
3+ ConfigureTextVectorizerOptions ,
24 InvertedIndexConfigCreate ,
35 InvertedIndexConfigUpdate ,
46 MultiTenancyConfigCreate ,
@@ -9,6 +11,8 @@ import {
911 ShardingConfigCreate ,
1012 VectorConfigUpdate ,
1113 VectorIndexType ,
14+ Vectorizer ,
15+ VectorizerConfigCreateType ,
1216 VectorizerUpdateOptions ,
1317} from '../types/index.js' ;
1418
@@ -18,6 +22,7 @@ import { configure as configureVectorIndex, reconfigure as reconfigureVectorInde
1822import { multiVectors , vectors } from './vectorizer.js' ;
1923
2024import { parseWithDefault } from './parsing.js' ;
25+ import { RemoveConfiguration } from './types/util.js' ;
2126
2227const dataType = {
2328 INT : 'int' as const ,
@@ -64,7 +69,7 @@ const configure = {
6469 * @deprecated Use `vectors` instead.
6570 */
6671 vectorizer : vectors ,
67- vectors,
72+ vectors : vectors as RemoveConfiguration < typeof vectors , 'vectorizeCollectionName' > ,
6873 vectorIndex : configureVectorIndex ,
6974 dataType,
7075 tokenization,
@@ -99,9 +104,9 @@ const configure = {
99104 bm25 :
100105 options . bm25b || options . bm25k1
101106 ? {
102- b : options . bm25b ,
103- k1 : options . bm25k1 ,
104- }
107+ b : options . bm25b ,
108+ k1 : options . bm25k1 ,
109+ }
105110 : undefined ,
106111 cleanupIntervalSeconds : options . cleanupIntervalSeconds ,
107112 indexTimestamps : options . indexTimestamps ,
@@ -110,10 +115,10 @@ const configure = {
110115 stopwords :
111116 options . stopwordsAdditions || options . stopwordsRemovals || options . stopwordsPreset
112117 ? {
113- preset : options . stopwordsPreset ,
114- additions : options . stopwordsAdditions ,
115- removals : options . stopwordsRemovals ,
116- }
118+ preset : options . stopwordsPreset ,
119+ additions : options . stopwordsAdditions ,
120+ removals : options . stopwordsRemovals ,
121+ }
117122 : undefined ,
118123 } ;
119124 } ,
@@ -131,10 +136,10 @@ const configure = {
131136 } ) : MultiTenancyConfigCreate => {
132137 return options
133138 ? {
134- autoTenantActivation : parseWithDefault ( options . autoTenantActivation , false ) ,
135- autoTenantCreation : parseWithDefault ( options . autoTenantCreation , false ) ,
136- enabled : parseWithDefault ( options . enabled , true ) ,
137- }
139+ autoTenantActivation : parseWithDefault ( options . autoTenantActivation , false ) ,
140+ autoTenantCreation : parseWithDefault ( options . autoTenantCreation , false ) ,
141+ enabled : parseWithDefault ( options . enabled , true ) ,
142+ }
138143 : { autoTenantActivation : false , autoTenantCreation : false , enabled : true } ;
139144 } ,
140145 /**
@@ -209,18 +214,18 @@ const reconfigure = {
209214 bm25 :
210215 options . bm25b || options . bm25k1
211216 ? {
212- b : options . bm25b ,
213- k1 : options . bm25k1 ,
214- }
217+ b : options . bm25b ,
218+ k1 : options . bm25k1 ,
219+ }
215220 : undefined ,
216221 cleanupIntervalSeconds : options . cleanupIntervalSeconds ,
217222 stopwords :
218223 options . stopwordsAdditions || options . stopwordsRemovals || options . stopwordsPreset
219224 ? {
220- preset : options . stopwordsPreset ,
221- additions : options . stopwordsAdditions ,
222- removals : options . stopwordsRemovals ,
223- }
225+ preset : options . stopwordsPreset ,
226+ additions : options . stopwordsAdditions ,
227+ removals : options . stopwordsRemovals ,
228+ }
224229 : undefined ,
225230 } ;
226231 } ,
0 commit comments