mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
edit the two lasts TODO comments
This commit is contained in:
parent
b15c77ebc4
commit
bad8ea47d5
@ -33,7 +33,8 @@ pub fn extract_geo_points<R: io::Read>(
|
|||||||
let bytes: [u8; 16] = concat_arrays![lat.to_ne_bytes(), lng.to_ne_bytes()];
|
let bytes: [u8; 16] = concat_arrays![lat.to_ne_bytes(), lng.to_ne_bytes()];
|
||||||
writer.insert(docid_bytes, bytes)?;
|
writer.insert(docid_bytes, bytes)?;
|
||||||
} else {
|
} else {
|
||||||
let primary_key = obkv.get(primary_key_id).unwrap(); // TODO: TAMO: is this valid?
|
// All document must have a primary key so we can unwrap safely here
|
||||||
|
let primary_key = obkv.get(primary_key_id).unwrap();
|
||||||
let primary_key =
|
let primary_key =
|
||||||
serde_json::from_slice(primary_key).map_err(InternalError::SerdeJson)?;
|
serde_json::from_slice(primary_key).map_err(InternalError::SerdeJson)?;
|
||||||
Err(UserError::InvalidGeoField { document_id: primary_key, object: point })?
|
Err(UserError::InvalidGeoField { document_id: primary_key, object: point })?
|
||||||
|
@ -229,7 +229,7 @@ impl<'t, 'u, 'i, 'a> IndexDocuments<'t, 'u, 'i, 'a> {
|
|||||||
) = crossbeam_channel::unbounded();
|
) = crossbeam_channel::unbounded();
|
||||||
|
|
||||||
// get the primary key field id
|
// get the primary key field id
|
||||||
let primary_key_id = fields_ids_map.id(&primary_key).unwrap(); // TODO: TAMO: is this unwrap 100% valid?
|
let primary_key_id = fields_ids_map.id(&primary_key).unwrap();
|
||||||
|
|
||||||
// get searchable fields for word databases
|
// get searchable fields for word databases
|
||||||
let searchable_fields =
|
let searchable_fields =
|
||||||
|
Loading…
Reference in New Issue
Block a user