mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
Update meilisearch-core/src/update/settings_update.rs
Co-authored-by: marin <postma.marin@protonmail.com>
This commit is contained in:
parent
06b2a587af
commit
bc0d53e819
@ -296,10 +296,7 @@ pub fn apply_synonyms_update(
|
|||||||
fn normalize<T: AsRef<[u8]>>(analyzer: &Analyzer<T>, text: &str) -> String {
|
fn normalize<T: AsRef<[u8]>>(analyzer: &Analyzer<T>, text: &str) -> String {
|
||||||
analyzer.analyze(&text)
|
analyzer.analyze(&text)
|
||||||
.tokens()
|
.tokens()
|
||||||
.fold(String::new(), |mut s, t| {
|
.fold(String::new(), |mut s, t| s + t.text())
|
||||||
s.push_str(&t.word);
|
|
||||||
s
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut synonyms_builder = SetBuilder::memory();
|
let mut synonyms_builder = SetBuilder::memory();
|
||||||
|
Loading…
Reference in New Issue
Block a user