mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
implement the deletion of geo points
This commit is contained in:
parent
44d6b6ae9e
commit
d344489c12
1 changed files with 13 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue