mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
add a comment
This commit is contained in:
parent
f068d7f978
commit
7cb2dcbdf8
@ -84,6 +84,8 @@ impl Index {
|
|||||||
.unwrap_or_else(BTreeSet::new);
|
.unwrap_or_else(BTreeSet::new);
|
||||||
let distinct_field = self.distinct_field(&txn)?.map(String::from);
|
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
|
let synonyms = self
|
||||||
.synonyms(&txn)?
|
.synonyms(&txn)?
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -277,14 +277,14 @@ impl Index {
|
|||||||
if let Some(ref stop_words) = settings.stop_words {
|
if let Some(ref stop_words) = settings.stop_words {
|
||||||
match stop_words {
|
match stop_words {
|
||||||
Some(stop_words) => builder.set_stop_words(stop_words.clone()),
|
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 {
|
if let Some(ref synonyms) = settings.synonyms {
|
||||||
match synonyms {
|
match synonyms {
|
||||||
Some(synonyms) => builder.set_synonyms(synonyms.clone().into_iter().collect()),
|
Some(synonyms) => builder.set_synonyms(synonyms.clone().into_iter().collect()),
|
||||||
_ => builder.reset_synonyms(),
|
None => builder.reset_synonyms(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user