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

ASF subversion and git services commented on SOLR-12375:
--------------------------------------------------------

Commit 11fb992abb3d209ab34a50956f2affe9626380b0 in lucene-solr's branch 
refs/heads/branch_7x from [~dsmiley]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=11fb992 ]

SOLR-12375: Optimize Lucene needsScore / ScoreMode use:
* A non-cached filter query could be told incorrectly that scores were needed.
* The /export (ExportQParserPlugin) would declare incorrectly that scores are 
needed.
* Expanded docs (expand component) could be told incorrectly that scores are 
needed.

note: non-trivial changes back-ported; ScoreMode is in master; 7x has 
needsScore.

(cherry picked from commit 53a3de3)


> ScoreMode not always set correctly in Solr queries
> --------------------------------------------------
>
>                 Key: SOLR-12375
>                 URL: https://issues.apache.org/jira/browse/SOLR-12375
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: search
>    Affects Versions: 5.1, 7.3.1
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Major
>             Fix For: 7.4
>
>         Attachments: SOLR-12375.patch
>
>
> A query can be informed that scores are not needed based on it's context/use, 
> and some queries are able to operate more efficiently if it knows this 
> up-front.  This is about the ScoreMode enum.
> I reviewed the use of {{ScoreMode.COMPLETE}} in Solr and I think we should 
> make the following changes:
> Solr filter queries (fq) are non-scoring.  
> {{SolrIndexSearcher.getProcessedFilter}} will pass ScoreMode.COMPLETE when it 
> ought to be COMPLETE_NO_SCORES to createWeight.  This perf bug is only 
> applicable when the filter query is not cached (either cache=false 
> local-param or no filter cache).  This error was made in LUCENE-6220 (Solr 
> 5.1); at that time it was a boolean.
> The {{/export}} handler (more specifically ExportQParserPlugin) is also 
> affected; it's COMPLETE when it should always be COMPLETE_NO_SCORES.  Also 
> appears to be in error since Solr 5.1.
> SolrIndexSearcher.getDocListAndSetNC ought to use TOP_SCORES to track the 
> top-score to be more correct but it's a distinction without a difference 
> since MultiCollector.wrap with the DocSetCollector will combine it with 
> COMPLETE_NO_SCORES to conclude the result is COMPLETE.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to