mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 18:45:06 +08:00
Ignore empty facet values
This commit is contained in:
parent
b3a22f31f6
commit
4860fd4529
@ -66,7 +66,7 @@ pub fn extract_fid_docid_facet_values<R: io::Read>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// insert normalized and original facet string in sorter
|
// insert normalized and original facet string in sorter
|
||||||
for (normalized, original) in strings {
|
for (normalized, original) in strings.into_iter().filter(|(n, _)| !n.is_empty()) {
|
||||||
key_buffer.truncate(size_of::<FieldId>() + size_of::<DocumentId>());
|
key_buffer.truncate(size_of::<FieldId>() + size_of::<DocumentId>());
|
||||||
key_buffer.extend_from_slice(normalized.as_bytes());
|
key_buffer.extend_from_slice(normalized.as_bytes());
|
||||||
fid_docid_facet_strings_sorter.insert(&key_buffer, original.as_bytes())?;
|
fid_docid_facet_strings_sorter.insert(&key_buffer, original.as_bytes())?;
|
||||||
|
Loading…
Reference in New Issue
Block a user