mettis
1.0.0
MetTISDB:通过 *scratch构建的分布式Lite矢量数据库。

使用PIP安装基本文本third_party服务的基本文本嵌入式服务的依赖项。
pip install -r requirements.txt然后像这样开始服务:
uvicorn main:app设置一个环境变量EmbeddingHost ,指向嵌入式服务的地址
export EmbeddingHost="http://127.0.0.1:8000/embeddings"
继续启动向量数据库的实例
go run cmd/server/main.go -httpAddr 127.0.0.1:8111 -nodeId 0 -raftAddr 127.0.0.1:9000索引文档
curl --location ' 127.0.0.1:8111/index ' --header ' Content-Type: application/json ' --data ' {"text": "some text"} ' 搜索
curl --location --request GET ' 127.0.0.1:8111/search '
--header ' Content-Type: application/json '
--data ' {"query": "some text"} ' 在不同的机器上运行以下命令(至少要模拟项目的不同实例)
go run cmd/server/main.go -httpAddr 127.0.0.1:8111 -nodeId 0 -raftAddr 127.0.0.1:9000复制品在127.0.0.1:9000上加入初选
go run cmd/server/main.go -httpAddr 127.0.0.1:8112 -nodeId 1 -raftAddr 127.0.0.1:9001 -joinAddr 127.0.0.1:8111go run cmd/server/main.go -httpAddr 127.0.0.1:8113 -nodeId 2 -raftAddr 127.0.0.1:9002 -joinAddr 127.0.0.1:8111