Milvus

From Retrieval to Structured Results: Aggregation and ORDER BY in Milvus 3.0

Aug 7, 2026Chun Han
From Retrieval to Structured Results: Aggregation and ORDER BY in Milvus 3.0
SummaryAI, from the source post

This post details the introduction of Query Aggregation and Search Aggregation in Milvus 3.0. Query Aggregation allows for exact statistics (count, sum, avg, min, max) with GROUP BY over filtered, visible rows, moving data processing from the application layer to the database. It explains the segment-local state merging strategy for distributed aggregation and how visibility rules are applied before aggregation. Search Aggregation organizes ANN candidates into buckets with per-bucket metrics and representative hits, providing a bounded view of similarity retrieval results. It clarifies the distinction between Search Aggregation and Grouping Search, and introduces server-side ORDER BY for both query and search results. The post emphasizes the benefits of in-engine processing for reduced data movement, correct global sorting, and consistent visibility.