Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

- Cosmetics.

Otis Gospodnetic51585c68daf2
diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.jj b/src/java/org/apache/lucene/queryParser/QueryParser.jj
index 9d5ccbd22e2..a067c8ee82b 100644
--- a/src/java/org/apache/lucene/queryParser/QueryParser.jj
+++ b/src/java/org/apache/lucene/queryParser/QueryParser.jj
@@ -535,8 +535,8 @@ Query Term(String field) : {
}
catch (Exception ignored) { }
- // could happen with boosted stopword
- if(q != null) {
+ // avoid boosting null queries, such as those caused by stop words
+ if (q != null) {
q.setBoost(f);
}
}