[ https://issues.apache.org/jira/browse/LUCENE-9823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17356058#comment-17356058 ]
ASF subversion and git services commented on LUCENE-9823: --------------------------------------------------------- Commit 89034ad8cf8019c62a0a4ed1e477cd52e1277e60 in lucene's branch refs/heads/main from Naoto MINAMI [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=89034ad ] LUCENE-9823: Prevent unsafe rewrites for SynonymQuery and CombinedFieldQuery. (#160) Before, rewriting could slightly change the scoring when weights were specified. We now rewrite less aggressively to avoid changing the query's behavior. > SynonymQuery rewrite can change field boost calculation > ------------------------------------------------------- > > Key: LUCENE-9823 > URL: https://issues.apache.org/jira/browse/LUCENE-9823 > Project: Lucene - Core > Issue Type: Bug > Reporter: Julie Tibshirani > Priority: Minor > Labels: newdev > Time Spent: 40m > Remaining Estimate: 0h > > SynonymQuery accepts a boost per term, which acts as a multiplier on the term > frequency in the document. When rewriting a SynonymQuery with a single term, > we create a BoostQuery wrapping a TermQuery. This changes the meaning of the > boost: it now multiplies the final TermQuery score instead of multiplying the > term frequency before it's passed to the score calculation. > This is a small point, but maybe it's worth avoiding rewriting a single-term > SynonymQuery unless the boost is 1.0. > The same consideration affects CombinedFieldQuery in sandbox. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org