You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Adrien Grand (Jira)" <ji...@apache.org> on 2022/02/08 16:25:01 UTC

[jira] [Resolved] (LUCENE-3331) consider allowing ScorerContext to specify that you dont need freqs/scores

     [ https://issues.apache.org/jira/browse/LUCENE-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand resolved LUCENE-3331.
----------------------------------
    Resolution: Duplicate

This one got fixed long ago. :)

> consider allowing ScorerContext to specify that you dont need freqs/scores
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-3331
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3331
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 4.0-ALPHA
>            Reporter: Robert Muir
>            Priority: Major
>
> This is just an idea for discussion (I have not yet thought everything through: know of a non-scary way to do the patch yet).
> But I think that it would be useful for ScorerContext to specify something like 'docsOnly', e.g. ConstantScoreQuery could pass this down here:
> {noformat}
> disi = innerWeight.scorer(context, scorerContext);
> {noformat}
> Basically this flag would specify that the caller does not care about freq() and score(), and in this case e.g. TermScorer could use a 
> docs-only bulkpostings for example, and never pull freqs. 
> Additionally, it wouldn't need to create a Similarity.DocScorer, which is just wastefully computing score cache in this case, 
> it could instead pass null, creat a scorer that does not use one, or use a Constant impl that always returns 1 or throws UOE, 
> depending on how we want to specify that score()/freq() should act if the caller does actually call it when this flag is set.



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