jaepil opened a new pull request, #16410:
URL: https://github.com/apache/lucene/pull/16410

   ### Description
   
   This fixes probability semantics and competitive pruning for 
`BayesianScoreQuery` and `LogOddsFusionQuery`.
   
   The previous fusion path applied softplus gating by default, which discarded 
negative log-odds evidence, and could propagate competitive-score pruning to 
individual signals. Pruning an individual negative signal changes matching 
negative evidence into a neutral non-match and can incorrectly increase the 
fused score. Single-active-signal leaves and `MatchNoDocsQuery` rewrites could 
also bypass or change the declared fusion model.
   
   The change:
   
   - preserves signed log-odds internally while returning a non-negative 
sigmoid probability;
   - keeps softplus gating as an explicit opt-in and retains existing 
constructor signatures;
   - supports per-signal prior removal and a single target prior;
   - preserves neutral signals across rewrites and single-active-signal leaves;
   - applies outer boosts after Bayesian calibration and fusion;
   - performs block-max skipping only from a safe upper bound on the final 
fused score; and
   - makes `BayesianScoreEstimator` use all matching live documents rather than 
a capped top-doc sample based on `maxDoc`.
   
   ### Validation
   
   - `./gradlew :lucene:core:test --tests 
org.apache.lucene.search.TestBayesianScoreQuery --tests 
org.apache.lucene.search.TestLogOddsFusionQuery`
   - `./gradlew :lucene:core:check -x checkLicenses` (8,548 tests passed, 309 
skipped)
   - `./gradlew checkLicenses`
   - `./gradlew :lucene:core:tidy :lucene:core:javadoc`
   - `uv run --project dev-tools prek run --files <changed files>`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to