mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-11 22:14:32 +01:00
implement the deletion of geo points
This commit is contained in:
parent
44d6b6ae9e
commit
d344489c12
@ -380,6 +380,19 @@ impl<'t, 'u, 'i> DeleteDocuments<'t, 'u, 'i> {
|
|||||||
|
|
||||||
drop(iter);
|
drop(iter);
|
||||||
|
|
||||||
|
if let Some(mut rtree) = self.index.geo_rtree(self.wtxn)? {
|
||||||
|
let points_to_remove: Vec<_> = rtree
|
||||||
|
.iter()
|
||||||
|
.filter(|&point| self.documents_ids.contains(point.data))
|
||||||
|
.cloned()
|
||||||
|
.collect();
|
||||||
|
points_to_remove.iter().for_each(|point| {
|
||||||
|
rtree.remove(&point);
|
||||||
|
});
|
||||||
|
|
||||||
|
self.index.put_geo_rtree(self.wtxn, &rtree)?;
|
||||||
|
}
|
||||||
|
|
||||||
// We delete the documents ids that are under the facet field id values.
|
// We delete the documents ids that are under the facet field id values.
|
||||||
remove_docids_from_facet_field_id_number_docids(
|
remove_docids_from_facet_field_id_number_docids(
|
||||||
self.wtxn,
|
self.wtxn,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user