Vector database Milvus: Why is it used to improve search efficiency?

Written by
Iris Vance
Updated on:July-08th-2025
Recommendation

Milvus, an open source vector database, is a powerful tool for improving the efficiency of unstructured data search.

Core content:
1. Milvus's high performance, scalability, and hybrid search features
2. Vector embedding technology and its application in semantic search, drug discovery, etc.
3. Technical comparison of Milvus with other vector databases and search libraries

Yang Fangxian
Founder of 53AI/Most Valuable Expert of Tencent Cloud (TVP)

Milvus Technical Analysis and Application Guide


Table of contents

  1. What is Milvus?
  2. Vector Embeddings
  3. Core concepts of vector database
  4. Unique Advantages of Milvus
  5. Milvus working principle and architecture
  6. Application Scenario

1. What is Milvus?

Milvus is an open source vector database designed for processing unstructured data. Its core function is to efficiently store, index, and retrieve vector embeddings (such as feature vectors of text, images, audio and video) generated by machine learning models. It was born in 2019 with the goal of solving the challenges of large-scale vector data through the following features:

  • High performance : Millisecond-level retrieval on trillion-level vector datasets.
  • Scalability : It adopts a cloud-native architecture that separates computing and storage, and supports dynamic expansion and contraction.
  • Hybrid search : supports joint filtering of vectors and scalars (such as text and numbers).
  • Multi-scenario support : covering image/video search, recommendation system, molecular discovery and other fields.

2. Vector Embeddings

Definition : Vector embedding is the process of converting unstructured data (such as text, images) into high-dimensional numerical vectors through deep learning models, capturing the semantic characteristics of the data. For example, the word "cat" may be represented as [0.2, -0.5, ..., 0.7].

Application scenarios :

  • Semantic search : Going beyond keyword matching to understand user intent (e.g. searching for “flying cats” returns images of bats).
  • Drug discovery : Accelerating drug candidate screening through molecular similarity.
  • Anomaly detection : Identifying unusual patterns of financial fraud or industrial equipment failure.

Technology comparison :

  • Sparse vectors (such as TF-IDF): only mark the existence of vocabulary and cannot express semantic associations.
  • Dense vectors (such as BERT embeddings): capture contextual relationships through neural networks and support semantic similarity calculations.

3. Core concepts of vector database

Differences from traditional databases :

characteristicTraditional databaseVector databases (such as Milvus)
Data Types
Structured data (tables)
Unstructured data (vectors)
Search method
Exact match (SQL query)
Approximate Nearest Neighbor (ANN) Search
Scalability
Vertical expansion is the main
Horizontal expansion (distributed architecture)
Typical scenarios
Trading system, CRM
Image retrieval and recommendation systems

Comparison with vector search libraries such as FAISS :

  • FAISS : Only provides indexing algorithms, and data updates and sharding need to be managed manually.
  • Milvus : A fully managed service that supports dynamic data addition and deletion, multi-tenant isolation, and SQL-like queries.

4. Unique advantages of Milvus

Technical highlights :

  • Diversified indexes : Supports more than 10 index types (such as HNSW, IVF_FLAT, and GPU-accelerated CAGRA) to meet different accuracy and speed requirements.
  • Hardware acceleration : Integrated NVIDIA GPU, index building speed increased by 50 times.
  • Hybrid search : combines vector similarity with scalar filtering (e.g. “price < 100 and images are similar”).
  • Consistency model : supports strong consistency or eventual consistency, balancing data freshness and query latency.

Competitive comparison (vs. Weaviate/Qdrant/Chroma):

databaseCore AdvantagesApplicable scenarios
Milvus
High performance, GPU support, multiple index types
Large-scale data and complex queries
Weaviate
Graph structured data, built-in machine learning models
Knowledge graph, semantic search
Qdrant
Low resource usage, flexible query
Small and medium scale, edge computing
Chroma
Lightweight, easy-to-use API
Rapid prototyping

5. Working Principle and Architecture of Milvus

Layered architecture :

  1. Access layer : Processes requests through a stateless proxy and supports REST/gRPC interfaces.
  2. Coordination service : manages metadata, load balancing, and task scheduling (such as Root/Data/Query Coordinator).
  3. Compute nodes :
  • Data Node : handles data writing and persistence.
  • Query Node : Performs mixed vector and scalar searches.
  • Storage layer :
    • Metadata storage : relies on etcd to manage metadata such as collections and partitions.
    • Log and object storage : Use Pulsar/MinIO for stream processing and persistence.

    Data flow example (taking image search as an example) :

    1. User uploads image → Extract feature vector through ResNet.
    2. The vector is stored in Milvus → automatic sharding and indexing.
    3. When querying, Milvus calculates similarity vectors → returns Top-K results.

    6. Application Scenarios

    Deployment recommendations :

    • Small and medium scale : Use Standalone mode (Docker deployment).
    • Enterprise level : Choose the cluster version and combine it with Kubernetes to achieve elastic scaling.