Fix facet string indexing

This commit is contained in:
ManyTheFish 2024-10-14 10:56:37 +02:00
parent 4e97e38177
commit a525598ad6

View File

@ -182,7 +182,8 @@ impl FacetedDocidsExtractor {
// String // String
// key: fid - level - truncated_string // key: fid - level - truncated_string
Value::String(s) => { Value::String(s) => {
let truncated = truncate_str(s); let normalized = crate::normalize_facet(s);
let truncated = truncate_str(&normalized);
buffer.clear(); buffer.clear();
buffer.push(FacetKind::String as u8); buffer.push(FacetKind::String as u8);
buffer.extend_from_slice(&fid.to_be_bytes()); buffer.extend_from_slice(&fid.to_be_bytes());