From 4860fd452965d234a11cc8430309bd9782a21bfd Mon Sep 17 00:00:00 2001 From: many Date: Wed, 1 Sep 2021 16:24:58 +0200 Subject: [PATCH] Ignore empty facet values --- .../index_documents/extract/extract_fid_docid_facet_values.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs b/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs index 08f2cadf0..c46329f61 100644 --- a/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs +++ b/milli/src/update/index_documents/extract/extract_fid_docid_facet_values.rs @@ -66,7 +66,7 @@ pub fn extract_fid_docid_facet_values( } // 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::() + size_of::()); key_buffer.extend_from_slice(normalized.as_bytes()); fid_docid_facet_strings_sorter.insert(&key_buffer, original.as_bytes())?;