diff --git a/src/java/org/apache/solr/search/function/BoostedQuery.java b/src/java/org/apache/solr/search/function/BoostedQuery.java index 08203a5f1b8..4bae945fc99 100755 --- a/src/java/org/apache/solr/search/function/BoostedQuery.java +++ b/src/java/org/apache/solr/search/function/BoostedQuery.java @@ -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); }