From 45d4361e7d4321095c08af739640a380e36981c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 30 Oct 2019 17:49:50 +0100 Subject: [PATCH] Correctly highlight when query string is longer --- meilidb-core/src/query_builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilidb-core/src/query_builder.rs b/meilidb-core/src/query_builder.rs index 236c6b699..04301c574 100644 --- a/meilidb-core/src/query_builder.rs +++ b/meilidb-core/src/query_builder.rs @@ -179,7 +179,7 @@ fn fetch_raw_documents( let is_exact = *is_exact && distance == 0 && input.len() == *query_len; let covered_area = if query.len() > input.len() { - query.len() + input.len() } else { prefix_damerau_levenshtein(query.as_bytes(), input).1 };