mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
Use compatibility decomposition normalizer in facets
This commit is contained in:
parent
e64571a881
commit
d1fc42b53a
@ -4,6 +4,7 @@ use std::fs::File;
|
||||
use std::io;
|
||||
use std::mem::size_of;
|
||||
|
||||
use charabia::normalizer::{CharNormalizer, CompatibilityDecompositionNormalizer};
|
||||
use heed::zerocopy::AsBytes;
|
||||
use heed::BytesEncode;
|
||||
use roaring::RoaringBitmap;
|
||||
@ -135,7 +136,9 @@ fn extract_facet_values(value: &Value) -> (Vec<f64>, Vec<(String, String)>) {
|
||||
}
|
||||
}
|
||||
Value::String(original) => {
|
||||
let normalized = original.trim().to_lowercase();
|
||||
let normalized = CompatibilityDecompositionNormalizer
|
||||
.normalize_str(original.trim())
|
||||
.to_lowercase();
|
||||
output_strings.push((normalized, original.clone()));
|
||||
}
|
||||
Value::Array(values) => {
|
||||
|
Loading…
Reference in New Issue
Block a user