Update milli/src/search/criteria/attribute.rs

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Many 2021-04-27 17:32:19 +02:00 committed by GitHub
parent c862b1bc6b
commit 3b1358b62f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -554,7 +554,7 @@ fn linear_compute_candidates(
QueryKind::Exact { word, .. } => { QueryKind::Exact { word, .. } => {
if *prefix { if *prefix {
word_derivations(word, true, 0, &words_positions) word_derivations(word, true, 0, &words_positions)
.flat_map(|positions| positions.iter().next()).min() .flat_map(|positions| positions.iter().next()).min()
} else { } else {
words_positions.get(word) words_positions.get(word)
.map(|positions| positions.iter().next()) .map(|positions| positions.iter().next())