fix union performance regression (#2663)

closes https://github.com/quickwit-oss/tantivy/issues/2656
This commit is contained in:
PSeitz-dd
2025-07-01 20:32:25 +02:00
committed by GitHub
parent 080fa4d1f4
commit 295d07e55c
2 changed files with 10 additions and 13 deletions

View File

@@ -180,7 +180,7 @@ impl BooleanQuery {
pub fn new(subqueries: Vec<(Occur, Box<dyn Query>)>) -> BooleanQuery {
// If the bool query includes at least one should clause
// and no Must or MustNot clauses, the default value is 1. Otherwise, the default value is
// 0. Keep pace with Elasticsearch.
// 0. Keep compatible with Elasticsearch.
let mut minimum_required = 0;
for (occur, _) in &subqueries {
match occur {