mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Finialize the GeoExtractor
This commit is contained in:
parent
a01bc7b454
commit
b17896d899
19 changed files with 497 additions and 93 deletions
|
@ -737,7 +737,7 @@ pub(crate) fn write_typed_chunk_into_index(
|
|||
}
|
||||
|
||||
/// Converts the latitude and longitude back to an xyz GeoPoint.
|
||||
fn extract_geo_point(value: &[u8], docid: DocumentId) -> GeoPoint {
|
||||
pub fn extract_geo_point(value: &[u8], docid: DocumentId) -> GeoPoint {
|
||||
let (lat, tail) = helpers::try_split_array_at::<u8, 8>(value).unwrap();
|
||||
let (lng, _) = helpers::try_split_array_at::<u8, 8>(tail).unwrap();
|
||||
let point = [f64::from_ne_bytes(lat), f64::from_ne_bytes(lng)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue