pub fn spatial_prefilter(
rtree: &RTree,
query_geometry: &Geometry,
distance_meters: Option<f64>,
exact_geometries: &dyn Fn(u64) -> Option<Geometry>,
) -> SpatialPreFilterResultExpand description
Execute the spatial pre-filter phase.
- Compute search bounding box from query geometry + optional distance expansion
- R-tree range search → rough candidates
- For each candidate, load geometry and apply exact predicate
- Return filtered entry IDs
The caller (vector engine) uses the candidate IDs to build a RoaringBitmap that restricts HNSW graph traversal.