[ 
https://issues.apache.org/jira/browse/LUCENE-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17388813#comment-17388813
 ] 

ASF subversion and git services commented on LUCENE-10039:
----------------------------------------------------------

Commit e31762253fcf7ef85fa0c09fdb40d3daf201a9d1 in lucene-solr's branch 
refs/heads/branch_8x from Julie Tibshirani
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=e317622 ]

LUCENE-10039: Fix single-field scoring for CombinedFieldQuery (#2535)

When there's only one field, CombinedFieldQuery will ignore its weight while
scoring. This makes the scoring inconsistent, since the field weight is supposed
to multiply its term frequency.

This PR removes the optimizations around single-field scoring to make sure the
weight is always taken into account. These optimizations are not critical since
it should be uncommon to use CombinedFieldQuery with only one field.

This backport also incorporates the part of LUCENE-9823 that applies to
CombinedFieldQuery. We no longer rewrite single-field queries, which can also
change their scoring.

> With a single field, CombinedFieldQuery can score incorrectly
> -------------------------------------------------------------
>
>                 Key: LUCENE-10039
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10039
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Julie Tibshirani
>            Priority: Minor
>             Fix For: 8.10
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> When there's only one field, {{CombinedFieldQuery}} will ignore its weight 
> while scoring. This makes the scoring inconsistent, since the field weight is 
> supposed to multiply its term frequency.
> This can also come up when searching over multiple fields, when some segment 
> happens to contain only one field. The problem was caught by this test:
> {code}
> ant test  -Dtestcase=TestCombinedFieldQuery 
> -Dtests.method=testCopyFieldWithMissingFields -Dtests.seed=8FA982798BC8FEF6 
> -Dtests.nightly=true
> {code}



--
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

Reply via email to