mirror of https://github.com/apache/lucene.git
SOLR-5492: Return the replica that actually served the query in shards.info response
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1545662 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9db2e666e2
commit
b1a7190dbb
|
@ -103,6 +103,9 @@ New Features
|
|||
This is intended to eventually replace the Suggester support through the
|
||||
SpellCheckComponent. (Areek Zillur, Varun Thacker via shalin)
|
||||
|
||||
* SOLR-5492: Return the replica that actually served the query in shards.info
|
||||
response. (shalin)
|
||||
|
||||
Bug Fixes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -813,11 +813,15 @@ public class QueryComponent extends SearchComponent
|
|||
StringWriter trace = new StringWriter();
|
||||
t.printStackTrace(new PrintWriter(trace));
|
||||
nl.add("trace", trace.toString() );
|
||||
if (srsp.getShardAddress() != null) {
|
||||
nl.add("shardAddress", srsp.getShardAddress());
|
||||
}
|
||||
}
|
||||
else {
|
||||
docs = (SolrDocumentList)srsp.getSolrResponse().getResponse().get("response");
|
||||
nl.add("numFound", docs.getNumFound());
|
||||
nl.add("maxScore", docs.getMaxScore());
|
||||
nl.add("shardAddress", srsp.getShardAddress());
|
||||
}
|
||||
if(srsp.getSolrResponse()!=null) {
|
||||
nl.add("time", srsp.getSolrResponse().getElapsedTime());
|
||||
|
|
Loading…
Reference in New Issue