BlogsMilvusQuery Aggregation and Search Aggregation

Query Aggregation and Search Aggregation

Query Aggregation and Search Aggregation

1
posts
2026

Milvus 3.0 introduces Query Aggregation for exact statistics (count, sum, avg, min, max) with GROUP BY over filtered, visible rows, and Search Aggregation for organizing ANN candidates into buckets with per-bucket metrics and representative hits. Server-side ORDER BY is also added for sorting query results or ANN candidates by scalar fields. These features move complex post-processing logic into the retrieval engine, reducing data movement and improving accuracy for large-scale applications.

2026

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

8/7/2026

Introduced Query Aggregation with segment-local state merging for distributed execution, handling MVCC visibility before aggregation. Implemented Search Aggregation with a three-stage execution (ANN search, bounded candidate retention per key, bucket building) and distinct control parameters (`SearchAggregation.size`, `TopHits.size`). Added server-side ORDER BY for both query and search results.