You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/01/03 13:28:00 UTC

[jira] [Commented] (LUCENE-10252) ValueSource.asDoubleValues shouldn't fetch score

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

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

Commit 1ee11a8497db571b83f8a8d68f38e7a9a738b745 in lucene's branch refs/heads/main from David Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=1ee11a8 ]

LUCENE-10252: ValueSource.asDoubleValues should not compute the score (#519)

ValueSource.asDoubleValues and asLongValues should not compute the score unless asked to -- typically never.  This fixes a performance regression since 7.3 LUCENE-8099 when some older boosting queries were replaced with this.

> ValueSource.asDoubleValues shouldn't fetch score
> ------------------------------------------------
>
>                 Key: LUCENE-10252
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10252
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/query
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The ValueSource.asDoubleValuesSource() method bridges the old API to the new one.  It's rather important because boosting a query no longer has an old API; in its place is using this method and passing to FunctionScoreQuery.boostByValue.  Unfortunately, asDoubleValuesSource will fetch/compute the score for the document in order to expose it in a Scorable on the "scorer" key of the context Map.  AFAICT nothing in Lucene or Solr actually uses this.  If it should be kept, the Scorable's score() method could fetch it at that time (e.g. on-demand).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org