From a525598ad66a6f5d4bcfdef309e654d038721b1a Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Mon, 14 Oct 2024 10:56:37 +0200 Subject: [PATCH] Fix facet string indexing --- milli/src/update/new/extract/faceted/extract_facets.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/milli/src/update/new/extract/faceted/extract_facets.rs b/milli/src/update/new/extract/faceted/extract_facets.rs index 6ae1b3124..14cc28da4 100644 --- a/milli/src/update/new/extract/faceted/extract_facets.rs +++ b/milli/src/update/new/extract/faceted/extract_facets.rs @@ -182,7 +182,8 @@ impl FacetedDocidsExtractor { // String // key: fid - level - truncated_string Value::String(s) => { - let truncated = truncate_str(s); + let normalized = crate::normalize_facet(s); + let truncated = truncate_str(&normalized); buffer.clear(); buffer.push(FacetKind::String as u8); buffer.extend_from_slice(&fid.to_be_bytes());