From e0eee44b641b8a252f29177b6a434b6daeb06e9f Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 24 Sep 2009 14:11:49 +0000 Subject: [PATCH] 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 --- src/java/org/apache/solr/search/function/BoostedQuery.java | 3 +++ 1 file changed, 3 insertions(+) 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); }