Increment position even when it's a stop word in exactness criteria

This commit is contained in:
Samyak S Sarnayak 2022-10-13 22:40:25 +05:30
parent ef13c6a5b6
commit 709ab3c14c
No known key found for this signature in database
GPG Key ID: 365873F2F0C6153B

View File

@ -298,11 +298,13 @@ fn attribute_start_with_docids(
pos += 1; pos += 1;
} }
Phrase(phrase) => { Phrase(phrase) => {
for word in phrase.iter().filter_map(|w| w.as_ref()) { for word in phrase {
if let Some(word) = word {
let wc = ctx.word_position_docids(word, pos)?; let wc = ctx.word_position_docids(word, pos)?;
if let Some(word_candidates) = wc { if let Some(word_candidates) = wc {
attribute_candidates_array.push(word_candidates); attribute_candidates_array.push(word_candidates);
} }
}
pos += 1; pos += 1;
} }
} }