From aeb676e757af7412567ee25b7533f7c880f57747 Mon Sep 17 00:00:00 2001 From: many Date: Thu, 17 Dec 2020 17:18:11 +0100 Subject: [PATCH] skip indexation while token is not a word --- meilisearch-core/src/raw_indexer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/meilisearch-core/src/raw_indexer.rs b/meilisearch-core/src/raw_indexer.rs index d83c02a28..a61a6f89c 100644 --- a/meilisearch-core/src/raw_indexer.rs +++ b/meilisearch-core/src/raw_indexer.rs @@ -138,6 +138,7 @@ where fn process_tokens<'a>(tokens: impl Iterator>) -> impl Iterator)> { tokens + .skip_while(|token| !token.is_word()) .scan((0, None), |(offset, prev_kind), token| { match token.kind { TokenKind::Word | TokenKind::StopWord | TokenKind::Unknown => {