mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
improve deletion
This commit is contained in:
@ -172,10 +172,8 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor {
|
|||||||
let docid = deletion.docid();
|
let docid = deletion.docid();
|
||||||
let current = deletion.current(rtxn, index, db_fields_ids_map)?;
|
let current = deletion.current(rtxn, index, db_fields_ids_map)?;
|
||||||
|
|
||||||
if let Some(geojson) = current.geojson_field()? {
|
if let Some(_geojson) = current.geojson_field()? {
|
||||||
let geojson = GeoJson::from_str(geojson.get()).map_err(UserError::from)?;
|
let buf = Vec::new();
|
||||||
let geometry = Geometry::try_from(geojson).map_err(UserError::from)?;
|
|
||||||
let buf = ZerometryCodec::bytes_encode(&geometry).unwrap();
|
|
||||||
|
|
||||||
match &mut data_ref.spilled_removed {
|
match &mut data_ref.spilled_removed {
|
||||||
Some(file) => {
|
Some(file) => {
|
||||||
@ -205,11 +203,8 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor {
|
|||||||
// If the current and new geo points are different it means that
|
// If the current and new geo points are different it means that
|
||||||
// we need to replace the current by the new point and therefore
|
// we need to replace the current by the new point and therefore
|
||||||
// delete the current point from cellulite.
|
// delete the current point from cellulite.
|
||||||
if let Some(geojson) = current_geo {
|
if let Some(_geojson) = current_geo {
|
||||||
let geojson =
|
let buf = Vec::new();
|
||||||
GeoJson::from_str(geojson.get()).map_err(UserError::from)?;
|
|
||||||
let geometry = Geometry::try_from(geojson).map_err(UserError::from)?;
|
|
||||||
let buf = ZerometryCodec::bytes_encode(&geometry).unwrap();
|
|
||||||
|
|
||||||
match &mut data_ref.spilled_removed {
|
match &mut data_ref.spilled_removed {
|
||||||
Some(file) => {
|
Some(file) => {
|
||||||
|
Reference in New Issue
Block a user