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

Alan Woodward commented on LUCENE-10252:
----------------------------------------

I'm pretty sure it *was* used when I first added this, but those uses may well 
have been refactored away in the interim. And there may be third-party code 
which expects the scorer to be available in the map as well, so we should 
probably keep it there. Making it only pull the score on demand seems 
reasonable.

> 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
>            Priority: Major
>
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to