Milvus

How to Use Hybrid Spatial and Vector Search with Milvus

Mar 18, 2026Alden
How to Use Hybrid Spatial and Vector Search with Milvus
SummaryAI, from the source post

This post details the implementation of the GEOMETRY data type and RTREE index in Milvus 2.6.4. It explains the limitations of traditional two-database approaches for hybrid spatial-vector search, the internal workings of GEOMETRY (following OGC Simple Features Access standard, using WKT/WKB) and RTREE indexing (MBRs, layered construction, O(log n) complexity), and the two-phase query execution (rough filter via R-Tree, fine filter via GEOS). It also provides performance insights on query latency, accuracy, and hybrid search throughput, along with a Python SDK example for defining schemas, inserting WKT data, and running hybrid queries using ST_DWITHIN.

More from the Geometry Field and RTREE Index for Geospatial Filtering trail