From a2a3b8c9739e6d04dc8e4fbd4f31afff4163fd4b Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 6 Jun 2023 15:08:13 +0200 Subject: [PATCH] Fix offset difference between query and indexing for hard separators --- milli/src/search/new/query_term/parse_query.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/search/new/query_term/parse_query.rs b/milli/src/search/new/query_term/parse_query.rs index 69c2cd9c9..6f146b208 100644 --- a/milli/src/search/new/query_term/parse_query.rs +++ b/milli/src/search/new/query_term/parse_query.rs @@ -79,7 +79,7 @@ pub fn located_query_terms_from_tokens( TokenKind::Separator(separator_kind) => { // add penalty for hard separators if let SeparatorKind::Hard = separator_kind { - position = position.wrapping_add(1); + position = position.wrapping_add(7); } phrase = 'phrase: {