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:
Mark Robert Miller 2009-09-24 14:11:49 +00:00
parent 162ace4e88
commit e0eee44b64
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}