mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02: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:
parent
3b8a9597e2
commit
7d190d8078
3 changed files with 180 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue