镜像自地址
https://github.com/meilisearch/MeiliSearch
已同步 2025-07-01 02:48:31 +02:00
fix 2 typos word derivation bug
这个提交包含在:
父节点
d2d930dd3f
当前提交
d5ddc6b080
@ -333,12 +333,12 @@ pub fn word_derivations<'c>(
|
|||||||
// in the case the typo is on the first letter, we know the number of typo
|
// in the case the typo is on the first letter, we know the number of typo
|
||||||
// is two
|
// is two
|
||||||
if get_first(found_word) != get_first(word) {
|
if get_first(found_word) != get_first(word) {
|
||||||
derived_words.push((word.to_string(), 2));
|
derived_words.push((found_word.to_string(), 2));
|
||||||
} else {
|
} else {
|
||||||
// Else, we know that it is the second dfa that matched and compute the
|
// Else, we know that it is the second dfa that matched and compute the
|
||||||
// correct distance
|
// correct distance
|
||||||
let d = second_dfa.distance((state.1).0);
|
let d = second_dfa.distance((state.1).0);
|
||||||
derived_words.push((word.to_string(), d.to_u8()));
|
derived_words.push((found_word.to_string(), d.to_u8()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
正在加载...
x
在新工单中引用
屏蔽一个用户