mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
add a bunch of tests and fix the error message when adding the geosearch as filterable/sortable while there is malformed documents in the DB
This commit is contained in:
@ -34,8 +34,10 @@ pub fn extract_geo_points<R: io::Read + io::Seek>(
|
||||
// since we only need the primary key when we throw an error
|
||||
// we create this getter to lazily get it when needed
|
||||
let document_id = || -> Value {
|
||||
let document_id = obkv.get(primary_key_id).unwrap();
|
||||
serde_json::from_slice(document_id).unwrap()
|
||||
let reader = KvReaderDelAdd::new(obkv.get(primary_key_id).unwrap());
|
||||
let document_id =
|
||||
reader.get(DelAdd::Deletion).or(reader.get(DelAdd::Addition)).unwrap();
|
||||
serde_json::from_slice(&document_id).unwrap()
|
||||
};
|
||||
|
||||
// first we get the two fields
|
||||
|
Reference in New Issue
Block a user