Skip to content

Apache Lucene open-source search software

SOLR-5629: SolrIndexSearcher.name should include core name

Shalin Shekhar Mangarb436fd64cb36
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 034a6eb66b5..29d87264ff9 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -366,6 +366,9 @@ Other Changes
* SOLR-5684: Shutdown SolrServer clients created in BasicDistributedZk2Test and
BasicDistributedZkTest. (Tomás Fernández Löbbe via shalin)
+* SOLR-5629: SolrIndexSearcher.name should include core name.
+ (Shikhar Bhushan via shalin)
+
================== 4.6.1 ==================
Versions of Major Components
diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
index d8f41715b60..972f1adaa6f 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
@@ -196,7 +196,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
this.atomicReader = SlowCompositeReaderWrapper.wrap(this.reader);
this.core = core;
this.schema = schema;
- this.name = "Searcher@" + Integer.toHexString(hashCode()) + (name!=null ? " "+name : "");
+ this.name = "Searcher@" + Integer.toHexString(hashCode()) + "[" + core.getName() + "]" + (name != null ? " " + name : "");
log.info("Opening " + this.name);
if (directoryFactory.searchersReserveCommitPoints()) {