mirror of https://github.com/apache/lucene.git
SOLR-1459: BoostedQuery needs to handle when its wrapped query weight returns null for the scorer
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@818490 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
162ace4e88
commit
e0eee44b64
|
@ -93,6 +93,9 @@ public class BoostedQuery extends Query {
|
|||
@Override
|
||||
public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException {
|
||||
Scorer subQueryScorer = qWeight.scorer(reader, true, false);
|
||||
if(subQueryScorer == null) {
|
||||
return null;
|
||||
}
|
||||
return new BoostedQuery.CustomScorer(getSimilarity(searcher), searcher, reader, this, subQueryScorer, boostVal);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue