mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
Ignore geo fields when the Del and Add content is the same
This commit is contained in:
parent
a3dae4db9b
commit
544440c363
@ -60,6 +60,7 @@ pub fn extract_geo_points<R: io::Read + io::Seek>(
|
||||
.map(|(lat, lng)| extract_lat_lng(lat, lng, document_id))
|
||||
.transpose()?;
|
||||
|
||||
if del_lat_lng != add_lat_lng {
|
||||
let mut obkv = KvWriterDelAdd::memory();
|
||||
if let Some([lat, lng]) = del_lat_lng {
|
||||
#[allow(clippy::drop_non_drop)]
|
||||
@ -74,6 +75,7 @@ pub fn extract_geo_points<R: io::Read + io::Seek>(
|
||||
let bytes = obkv.into_inner()?;
|
||||
writer.insert(docid_bytes, bytes)?;
|
||||
}
|
||||
}
|
||||
(None, Some(_)) => {
|
||||
return Err(GeoError::MissingLatitude { document_id: document_id() }.into())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user