From 4f69b190bc31620c1a03ade5f154a85a4c1fa850 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 7 Sep 2021 11:49:27 +0200 Subject: [PATCH] remove the distance from the search, the computation of the distance will be made on meilisearch side --- milli/src/search/criteria/geo.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/milli/src/search/criteria/geo.rs b/milli/src/search/criteria/geo.rs index bf3ae7aba..6f8f1406a 100644 --- a/milli/src/search/criteria/geo.rs +++ b/milli/src/search/criteria/geo.rs @@ -106,8 +106,8 @@ fn geo_point( point: [f64; 2], ) -> Box> { let results = rtree - .nearest_neighbor_iter_with_distance_2(&point) - .filter_map(move |(point, _distance)| candidates.contains(point.data).then(|| point.data)) + .nearest_neighbor_iter(&point) + .filter_map(move |point| candidates.contains(point.data).then(|| point.data)) .map(|id| std::iter::once(id).collect::()) .collect::>();