refactor(vector-store): 优化Milvus向量存储策略实现

重构Milvus向量存储策略,引入连接缓存机制减少重复创建连接的开销
将vectorModelName重命名为vectorStoreName以更准确表达用途
移除默认配置值,改为必须显式配置
优化代码结构,减少重复代码
This commit is contained in:
Yzm
2025-10-17 17:19:01 +08:00
parent 962c2b693c
commit 9d4a0e0b36
5 changed files with 54 additions and 107 deletions

View File

@@ -17,7 +17,7 @@ public class VectorStoreProperties {
/**
* 向量库类型
*/
private String type = "weaviate";
private String type;
/**
* Weaviate配置
@@ -34,17 +34,17 @@ public class VectorStoreProperties {
/**
* 协议
*/
private String protocol = "http";
private String protocol;
/**
* 主机地址
*/
private String host = "localhost:8080";
private String host;
/**
* 类名
*/
private String classname = "Document";
private String classname;
}
@Data
@@ -52,11 +52,11 @@ public class VectorStoreProperties {
/**
* 连接URL
*/
private String url = "http://localhost:19530";
private String url;
/**
* 集合名称
*/
private String collectionname = "knowledge_base";
private String collectionname;
}
}