remove the distance from the search, the computation of the distance will be made on meilisearch side

This commit is contained in:
Tamo 2021-09-07 11:49:27 +02:00
parent 7ae2a7341c
commit 4f69b190bc
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69

View File

@ -106,8 +106,8 @@ fn geo_point(
point: [f64; 2], point: [f64; 2],
) -> Box<dyn Iterator<Item = RoaringBitmap>> { ) -> Box<dyn Iterator<Item = RoaringBitmap>> {
let results = rtree let results = rtree
.nearest_neighbor_iter_with_distance_2(&point) .nearest_neighbor_iter(&point)
.filter_map(move |(point, _distance)| candidates.contains(point.data).then(|| point.data)) .filter_map(move |point| candidates.contains(point.data).then(|| point.data))
.map(|id| std::iter::once(id).collect::<RoaringBitmap>()) .map(|id| std::iter::once(id).collect::<RoaringBitmap>())
.collect::<Vec<_>>(); .collect::<Vec<_>>();