From 7cb2dcbdf88ec678008fb1d6983d2432e3e81aaa Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 14 Jun 2021 10:38:56 +0200 Subject: [PATCH] add a comment --- meilisearch-http/src/index/mod.rs | 2 ++ meilisearch-http/src/index/updates.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/index/mod.rs b/meilisearch-http/src/index/mod.rs index cb942a7b8..56958760a 100644 --- a/meilisearch-http/src/index/mod.rs +++ b/meilisearch-http/src/index/mod.rs @@ -84,6 +84,8 @@ impl Index { .unwrap_or_else(BTreeSet::new); let distinct_field = self.distinct_field(&txn)?.map(String::from); + // in milli each word in the synonyms map were split on their separator. Since we lost + // this information we are going to put space between words. let synonyms = self .synonyms(&txn)? .iter() diff --git a/meilisearch-http/src/index/updates.rs b/meilisearch-http/src/index/updates.rs index 3e31cd75c..fc475aa4d 100644 --- a/meilisearch-http/src/index/updates.rs +++ b/meilisearch-http/src/index/updates.rs @@ -277,14 +277,14 @@ impl Index { if let Some(ref stop_words) = settings.stop_words { match stop_words { Some(stop_words) => builder.set_stop_words(stop_words.clone()), - _ => builder.reset_stop_words(), + None => builder.reset_stop_words(), } } if let Some(ref synonyms) = settings.synonyms { match synonyms { Some(synonyms) => builder.set_synonyms(synonyms.clone().into_iter().collect()), - _ => builder.reset_synonyms(), + None => builder.reset_synonyms(), } }