高性能云原生向量数据库Milvus

项目概述

Milvus是一款高性能的云原生向量数据库,专为可扩展的近似最近邻搜索而设计,能够高效处理大规模向量数据,广泛应用于图像搜索和相似度检索等场景。

项目地址

https://github.com/milvus-io/milvus

项目页面预览

milvus-io/milvus preview

关键指标

  • Stars:42252
  • 主要语言:Go
  • License:Apache License 2.0
  • 最近更新:2026-01-15T13:04:35Z
  • 默认分支:master

本站高速下载(国内可用)

点击下载(本站镜像)
– SHA256:484712c7cf1d858b60598007104de22afdb61f64e551794471c10effade4695c

安装部署要点(README 精选)

Quickstart

$ pip install -U pymilvus

This installs pymilvus, the Python SDK for Milvus. Use MilvusClient to create a client:

from pymilvus import MilvusClient
  • You can also try Milvus Lite for quickstart by installing pymilvus[milvus-lite]. To create a local vector database, simply instantiate a client with a local file name for persisting data:

python
client = MilvusClient("milvus_demo.db")

python
client = MilvusClient(
uri="<endpoint_of_self_hosted_milvus_or_zilliz_cloud>",
token="<username_and_password_or_zilliz_cloud_api_key>")

With the client, you can create collection:

client.create_collection(
    collection_name="demo_collection",
    dimension=768,  # The vectors we will use in this demo have 768 dimensions
)

Ingest data:

res = client.insert(collection_name="demo_collection", data=data)

Perform vector search:

query_vectors = embedding_fn.encode_queries(["Who is Alan Turing?", "What is AI?"])
res = client.search(
    collection_name="demo_collection",  # target collection
    data=query_vectors,  # a list of one or more query vectors, supports batch
    limit=2,  # how many results to return (topK)
    output_fields=["vector", "text", "subject"],  # what fields to return
)

常用命令(从 README 提取)

Go: >= 1.21
  CMake: >= 3.26.4 && CMake < 4
  GCC: 9.5
  Python: > 3.8 and  <= 3.11

Go: >= 1.21
  CMake: >= 3.26.4 && CMake < 4
  llvm: >= 15
  Python: > 3.8 and  <= 3.11

Go: >= 1.21 (Arch=ARM64)
  CMake: >= 3.26.4 && CMake < 4
  llvm: >= 15
  Python: > 3.8 and  <= 3.11

通用部署说明

  1. 下载源码并阅读 README
  2. 安装依赖(pip/npm/yarn 等)
  3. 配置环境变量(API Key、模型路径、数据库等)
  4. 启动服务并测试访问
  5. 上线建议:Nginx 反代 + HTTPS + 进程守护(systemd / pm2)

免责声明与版权说明

本文仅做开源项目整理与教程索引,源码版权归原作者所有,请遵循对应 License 合规使用。

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容