mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Don't remove phrases with "last" term matching strategy
This commit is contained in:
parent
12b26cd54e
commit
24e5f6f7a9
1 changed files with 5 additions and 0 deletions
|
@ -891,6 +891,11 @@ pub fn make_ngram(
|
|||
number_of_typos_allowed: &impl Fn(&str) -> u8,
|
||||
) -> Result<Option<LocatedQueryTerm>> {
|
||||
assert!(!terms.is_empty());
|
||||
for t in terms {
|
||||
if ctx.term_interner.get(t.value).zero_typo.phrase.is_some() {
|
||||
return Ok(None);
|
||||
}
|
||||
}
|
||||
for ts in terms.windows(2) {
|
||||
let [t1, t2] = ts else { panic!() };
|
||||
if *t1.positions.end() != t2.positions.start() - 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue