mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
add test for exact words
This commit is contained in:
parent
7e9d56a9e7
commit
c882d8daf0
@ -623,9 +623,7 @@ mod test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn exact_words(&self) -> crate::Result<fst::Set<Cow<[u8]>>> {
|
fn exact_words(&self) -> crate::Result<fst::Set<Cow<[u8]>>> {
|
||||||
let builder = fst::SetBuilder::new(Vec::new()).unwrap();
|
Ok(fst::Set::new(Cow::Borrowed(self.exact_words.as_slice())).unwrap())
|
||||||
let data = builder.into_inner().unwrap();
|
|
||||||
Ok(fst::Set::new(Cow::Owned(data)).unwrap())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1269,6 +1267,7 @@ mod test {
|
|||||||
QueryKind::Tolerant { typo: 2, word: "verylongword".to_string() }
|
QueryKind::Tolerant { typo: 2, word: "verylongword".to_string() }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn disable_typo_on_word() {
|
fn disable_typo_on_word() {
|
||||||
let query = "goodbye";
|
let query = "goodbye";
|
||||||
|
Loading…
Reference in New Issue
Block a user