rmuir commented on code in PR #15818:
URL: https://github.com/apache/lucene/pull/15818#discussion_r2984774408
##########
lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java:
##########
@@ -425,24 +426,39 @@ public Query rewrite(IndexSearcher indexSearcher) throws
IOException {
}
}
- // Deduplicate SHOULD clauses by summing up their boosts
+ // Deduplicate SHOULD clauses. Tracks [boostSum, count] per query.
+ // Uses Similarity.computeQueryTermWeight for unweighted duplicates (e.g.
"a a a"),
+ // falls back to linear boost sum when explicit boosts are present (e.g.
"a^2 a^3").
Review Comment:
this behavior is a bit odd and difficult to understand. i'm not sure I
immediately have a better idea to offer either.
I guess qtf could be processed separately from the boost, but that would
create a much more invasive change.
This approach could use some fresh eyes and thoughts before committing to it.
--
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]