Fix query tree building

This commit is contained in:
ManyTheFish 2022-08-18 17:56:06 +02:00
parent bff9653050
commit 993aa1321c

View File

@ -454,7 +454,7 @@ fn create_query_tree(
let mut operation_children = Vec::new();
let mut query = query.to_vec();
for _ in 0..=remove_count {
for _ in 0..remove_count {
let pos = match optional_words {
TermsMatchingStrategy::All => return ngrams(ctx, authorize_typos, &query, false),
TermsMatchingStrategy::Any => {
@ -511,7 +511,7 @@ fn create_query_tree(
};
}
Ok(Operation::Or(true, operation_children))
Ok(Operation::or(true, operation_children))
}
/// Main function that matchings words used for crop and highlight.