mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
Correctly highlight when query string is longer
This commit is contained in:
parent
b28c44cc6b
commit
45d4361e7d
@ -179,7 +179,7 @@ fn fetch_raw_documents(
|
|||||||
let is_exact = *is_exact && distance == 0 && input.len() == *query_len;
|
let is_exact = *is_exact && distance == 0 && input.len() == *query_len;
|
||||||
|
|
||||||
let covered_area = if query.len() > input.len() {
|
let covered_area = if query.len() > input.len() {
|
||||||
query.len()
|
input.len()
|
||||||
} else {
|
} else {
|
||||||
prefix_damerau_levenshtein(query.as_bytes(), input).1
|
prefix_damerau_levenshtein(query.as_bytes(), input).1
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user