mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-14 00:36:25 +00:00
Polish some details
This commit is contained in:
committed by
Loïc Lecrenier
parent
cb8442a119
commit
51961e1064
@ -33,10 +33,6 @@ pub fn extract_facet_string_docids<R: io::Read + io::Seek>(
|
||||
let (field_id_bytes, bytes) = try_split_array_at(key).unwrap();
|
||||
let field_id = FieldId::from_be_bytes(field_id_bytes);
|
||||
|
||||
// document_id_bytes is a big-endian u32
|
||||
// merge_cbo_roaring_bitmap works with native endian u32s
|
||||
// that is a problem, I think
|
||||
|
||||
let (document_id_bytes, normalized_value_bytes) =
|
||||
try_split_array_at::<_, 4>(bytes).unwrap();
|
||||
let document_id = u32::from_be_bytes(document_id_bytes);
|
||||
@ -45,6 +41,7 @@ pub fn extract_facet_string_docids<R: io::Read + io::Seek>(
|
||||
let key = FacetGroupKey { field_id, level: 0, left_bound: normalised_value };
|
||||
let key_bytes = FacetGroupKeyCodec::<StrRefCodec>::bytes_encode(&key).unwrap();
|
||||
|
||||
// document id is encoded in native-endian because of the CBO roaring bitmap codec
|
||||
facet_string_docids_sorter.insert(&key_bytes, &document_id.to_ne_bytes())?;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user