@@ -325,55 +325,6 @@ def migrate_knowledge_vector_database():
325
325
326
326
elif vector_type in lower_colletion_vector_types :
327
327
collection_name = Dataset .gen_collection_name_by_id (dataset_id ).lower ()
328
- elif vector_type == VectorType .MILVUS :
329
- dataset_id = dataset .id
330
- collection_name = Dataset .gen_collection_name_by_id (dataset_id )
331
- index_struct_dict = {"type" : VectorType .MILVUS , "vector_store" : {"class_prefix" : collection_name }}
332
- dataset .index_struct = json .dumps (index_struct_dict )
333
- elif vector_type == VectorType .RELYT :
334
- dataset_id = dataset .id
335
- collection_name = Dataset .gen_collection_name_by_id (dataset_id )
336
- index_struct_dict = {"type" : "relyt" , "vector_store" : {"class_prefix" : collection_name }}
337
- dataset .index_struct = json .dumps (index_struct_dict )
338
- elif vector_type == VectorType .TENCENT :
339
- dataset_id = dataset .id
340
- collection_name = Dataset .gen_collection_name_by_id (dataset_id )
341
- index_struct_dict = {"type" : VectorType .TENCENT , "vector_store" : {"class_prefix" : collection_name }}
342
- dataset .index_struct = json .dumps (index_struct_dict )
343
- elif vector_type == VectorType .PGVECTOR :
344
- dataset_id = dataset .id
345
- collection_name = Dataset .gen_collection_name_by_id (dataset_id )
346
- index_struct_dict = {"type" : VectorType .PGVECTOR , "vector_store" : {"class_prefix" : collection_name }}
347
- dataset .index_struct = json .dumps (index_struct_dict )
348
- elif vector_type == VectorType .OPENSEARCH :
349
- dataset_id = dataset .id
350
- collection_name = Dataset .gen_collection_name_by_id (dataset_id )
351
- index_struct_dict = {
352
- "type" : VectorType .OPENSEARCH ,
353
- "vector_store" : {"class_prefix" : collection_name },
354
- }
355
- dataset .index_struct = json .dumps (index_struct_dict )
356
- elif vector_type == VectorType .ANALYTICDB :
357
- dataset_id = dataset .id
358
- collection_name = Dataset .gen_collection_name_by_id (dataset_id )
359
- index_struct_dict = {
360
- "type" : VectorType .ANALYTICDB ,
361
- "vector_store" : {"class_prefix" : collection_name },
362
- }
363
- dataset .index_struct = json .dumps (index_struct_dict )
364
- elif vector_type == VectorType .ELASTICSEARCH :
365
- dataset_id = dataset .id
366
- index_name = Dataset .gen_collection_name_by_id (dataset_id )
367
- index_struct_dict = {"type" : "elasticsearch" , "vector_store" : {"class_prefix" : index_name }}
368
- dataset .index_struct = json .dumps (index_struct_dict )
369
- elif vector_type == VectorType .BAIDU :
370
- dataset_id = dataset .id
371
- collection_name = Dataset .gen_collection_name_by_id (dataset_id )
372
- index_struct_dict = {
373
- "type" : VectorType .BAIDU ,
374
- "vector_store" : {"class_prefix" : collection_name },
375
- }
376
- dataset .index_struct = json .dumps (index_struct_dict )
377
328
else :
378
329
raise ValueError (f"Vector store { vector_type } is not supported." )
379
330
0 commit comments