
Milvus
Milvus Standalone: Cloud-native vector DB for scalable, fast ANN search.
minio
minio/minio:latest
Just deployed
/minio_data
etcd
coreos/etcd:v3.6.0
Just deployed
/etcd
standalone
milvusdb/milvus:latest
Just deployed
/var/lib/milvus
What is Milvus?
š¦ Milvus is a high-performance vector database built for scale. It powers AI applications by efficiently organizing and searching vast amounts of unstructured data, such as text, images, and multi-modal information.
š§āš» Written in Go and C++, Milvus uses CPU/GPU hardware acceleration for top vector search performance. Its fully-distributed and K8s-native architecture allows horizontal scaling, handling 10k+ queries on billion+ vectors with real-time streaming updates. Also supports Standalone mode for single machines and Milvus Lite (pip install
for Python quickstarts).
Want to use Milvus with zero setup? Try out Zilliz Cloud āļø for free. Milvus is available as a fully managed service on Zilliz Cloud, with Serverless, Dedicated and BYOC options available.
For questions about how to use Milvus, join the community on Discord to get help. For reporting problems, file bugs and feature requests in GitHub Issues or ask in Discussions.
The Milvus open-source project is under LF AI & Data Foundation, distributed with Apache 2.0 License, with Zilliz as its major contributor.
Quickstart
$ pip install -U pymilvus
This installs pymilvus
, the Python SDK for Milvus. Use MilvusClient
to create a client:
from pymilvus import MilvusClient
-
pymilvus
also includes Milvus Lite for quickstart. To create a local vector database, simply instantiate a client with a local file name for persisting data:client = MilvusClient("milvus_demo.db")
-
You can also specify the credentials to connect to your deployed Milvus server or Zilliz Cloud:
client = MilvusClient( uri="", token="")
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
)
Why Milvus
Milvus excels at scalable vector search, storing vectors alongside scalar data for efficient filtered or hybrid searches. Developers choose Milvus for:
High Performance at Scale and High Availability Milvus's distributed architecture separates compute and storage for horizontal scaling and adapting to diverse traffic. Stateless microservices on K8s enable quick recovery, ensuring high availability. Replicas further boost fault tolerance and throughput. See benchmark.
Support for Various Vector Index Types and Hardware Acceleration Milvus supports major vector indexes (HNSW, IVF, FLAT, SCANN, DiskANN) with quantization-based options and mmap. It optimizes vector search with features like metadata filtering and range search. Milvus also implements hardware acceleration, supporting GPU indexing like NVIDIA's CAGRA.
Flexible Multi-tenancy and Hot/Cold Storage Milvus offers multi-tenancy (database, collection, partition, or key level) for optimized performance and access control. It uses hot/cold storage for cost-effectiveness, keeping frequently accessed data on faster storage and less-accessed data on cost-effective storage.
Sparse Vector for Full Text Search and Hybrid Search Beyond dense vectors for semantic search, Milvus natively supports full text search (BM25, SPLADE, BGE-M3) using sparse vectors. Users can combine sparse and dense vectors in one collection and rerank results. See examples of Hybrid Search with semantic search + full text search.
Data Security and Fine-grain Access Control Milvus ensures security with user authentication, TLS encryption, and Role-Based Access Control (RBAC) for fine-grained permissions, protecting sensitive enterprise data.
Milvus is trusted for AI applications like text/image search, RAG, and recommendation systems, powering many mission-critical business for various companies.
Ecosystem and Integration
Milvus integrates with AI development tools like LangChain, LlamaIndex, OpenAI, and HuggingFace, making it ideal for GenAI apps such as RAG. It supports open-source and service-based embedding models for text, image, and video. Milvus offers pymilvus[model]
for transforming data into embeddings and using reranking models. The ecosystem includes Attu (GUI admin), Birdwatcher (debugging), Prometheus/Grafana (monitoring), Milvus CDC (data sync), VTS (data migration), and connectors for Spark, Kafka, Fivetran, and Airbyte to build search pipelines.
Check out https://milvus.io/docs/integrations_overview.md for more details.
Documentation
For guidance on installation, usage, deployment, and administration, check out Milvus Docs. For technical milestones and enhancement proposals, check out issues on GitHub.
Community
Join the Milvus community on Discord to share your suggestions, advice, and questions with our engineering team.
To learn latest news about Milvus, follow us on social media:
You can also check out our FAQ page to discover solutions or answers to your issues or questions, and subscribe to Milvus mailing lists:
Template Content