mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
Search for closest non-stop words in proximity criteria
This commit is contained in:
parent
709ab3c14c
commit
3e190503e6
@ -187,14 +187,15 @@ fn resolve_candidates<'t>(
|
||||
Phrase(words) => {
|
||||
if proximity == 0 {
|
||||
let most_left = words
|
||||
.first()
|
||||
.map(|o| o.as_ref())
|
||||
.flatten()
|
||||
.iter()
|
||||
.filter_map(|o| o.as_ref())
|
||||
.next()
|
||||
.map(|w| Query { prefix: false, kind: QueryKind::exact(w.clone()) });
|
||||
let most_right = words
|
||||
.last()
|
||||
.map(|o| o.as_ref())
|
||||
.flatten()
|
||||
.iter()
|
||||
.rev()
|
||||
.filter_map(|o| o.as_ref())
|
||||
.next()
|
||||
.map(|w| Query { prefix: false, kind: QueryKind::exact(w.clone()) });
|
||||
|
||||
match (most_left, most_right) {
|
||||
|
Loading…
Reference in New Issue
Block a user