Skip to content

Conversation

stuhood
Copy link
Contributor

@stuhood stuhood commented Sep 19, 2025

Re-reading #2538, I noticed that the proptest's total document count was not large enough to exercise some of the constants -- for example, the buffered union HORIZON value.

Increasing the total document count (by repeating all unique permutations more times to reach a target size) exposes a failure which minimizes to:

Intersection(
    [
        Leaf {
            field_idx: 0,
        },
        Union(
            [
                Leaf {
                    field_idx: 2,
                },
                Leaf {
                    field_idx: 2,
                },
            ],
        ),
    ],
)

in:

   0: __rustc::rust_begin_unwind
             at /rustc/d7ea436a02d5de4033fcf7fd4eb8ed965d0f574c/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/d7ea436a02d5de4033fcf7fd4eb8ed965d0f574c/library/core/src/panicking.rs:75:14
   2: core::panicking::panic_const::panic_const_sub_overflow
             at /rustc/d7ea436a02d5de4033fcf7fd4eb8ed965d0f574c/library/core/src/panicking.rs:178:21
   3: tantivy::query::union::buffered_union::BufferedUnionScorer<TScorer,TScoreCombiner>::is_in_horizon
             at ./src/query/union/buffered_union.rs:128:19
   4: <tantivy::query::union::buffered_union::BufferedUnionScorer<TScorer,TScoreCombiner> as tantivy::docset::DocSet>::seek_into_the_danger_zone
             at ./src/query/union/buffered_union.rs:206:12
   5: <alloc::boxed::Box<TDocSet> as tantivy::docset::DocSet>::seek_into_the_danger_zone
             at ./src/docset.rs:216:9
   6: <tantivy::query::intersection::Intersection<TDocSet,TOtherDocSet> as tantivy::docset::DocSet>::advance
             at ./src/query/intersection.rs:118:20
   7: tantivy::docset::DocSet::fill_buffer
             at ./src/docset.rs:102:16
   8: tantivy::query::weight::for_each_docset_buffered
             at ./src/query/weight.rs:29:25
   9: <tantivy::query::boolean_query::boolean_weight::BooleanWeight<TScoreCombiner> as tantivy::query::weight::Weight>::for_each_no_score
             at ./src/query/boolean_query/boolean_weight.rs:343:17
  10: tantivy::collector::Collector::collect_segment
             at ./src/collector/mod.rs:198:17
  11: tantivy::core::searcher::Searcher::search_with_executor::{{closure}}
             at ./src/core/searcher.rs:231:17

@stuhood stuhood force-pushed the stuhood.boolean-query-proptest-size branch from 2157286 to 2c904e1 Compare September 19, 2025 21:07
@PSeitz-dd PSeitz-dd merged commit 1e10c2e into quickwit-oss:fix_size_hint Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants