SOLR-15061: Fix NPE in SearchHandler when shards.info and no QueryComponent configured

This commit is contained in:
Bruno Roustant 2020-12-24 11:43:04 +01:00
parent 1bb9755e4a
commit 5e21e3f380
No known key found for this signature in database
GPG Key ID: CD28DABB95360525
2 changed files with 3 additions and 2 deletions

View File

@ -281,6 +281,8 @@ Bug Fixes
* SOLR-15031: Fix preventing null being wrapped in a QueryValueSource subQuery. Such null queries can be caused by query text
resulting in an empty token stream. (Pieter van Boxtel via Mike Drob)
* SOLR-15061: Fix NPE in SearchHandler when shards.info and no QueryComponent configured. (Bruno Roustant)
Other Changes
---------------------

View File

@ -521,8 +521,7 @@ public class SearchHandler extends RequestHandlerBase implements SolrCoreAware,
StringWriter trace = new StringWriter();
cause.printStackTrace(new PrintWriter(trace));
nl.add("trace", trace.toString() );
}
else {
} else if (rb.getResults() != null) {
nl.add("numFound", rb.getResults().docList.matches());
nl.add("numFoundExact", rb.getResults().docList.hitCountRelation() == TotalHits.Relation.EQUAL_TO);
nl.add("maxScore", rb.getResults().docList.maxScore());