mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
Update milli/src/search/matches/mod.rs
This commit is contained in:
parent
fb794c6b5e
commit
a277daa1f2
@ -252,7 +252,7 @@ impl<'t, A: AsRef<[u8]>> Matcher<'t, '_, A> {
|
|||||||
let mut remaining_words = crop_size + first_match_word_position - last_match_word_position;
|
let mut remaining_words = crop_size + first_match_word_position - last_match_word_position;
|
||||||
|
|
||||||
// create the initial state of the crop window: 2 iterators starting from the matches positions,
|
// create the initial state of the crop window: 2 iterators starting from the matches positions,
|
||||||
// a reverse iterator starting from the first match token position and going trew the beginning of the text,
|
// a reverse iterator starting from the first match token position and going towards the beginning of the text,
|
||||||
let mut before_tokens = tokens[..first_match_token_position].iter().rev().peekable();
|
let mut before_tokens = tokens[..first_match_token_position].iter().rev().peekable();
|
||||||
// an iterator starting from the last match token position and going trew the end of the text.
|
// an iterator starting from the last match token position and going trew the end of the text.
|
||||||
let mut after_tokens = tokens[last_match_token_position..].iter().peekable();
|
let mut after_tokens = tokens[last_match_token_position..].iter().peekable();
|
||||||
|
Loading…
Reference in New Issue
Block a user