diff --git a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java index 233a3b7d247..2305948ae46 100644 --- a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java @@ -404,7 +404,7 @@ public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throw rb.isDistrib = isDistrib(req); tagRequestWithRequestId(rb); - if (req.getPath().contains("select")) { + if (req.getPath() != null && req.getPath().contains("select")) { if (isShard) { // log a simple message on start log.info("Start Forwarded Search Query");