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