mirror of https://github.com/apache/lucene.git
SOLR-335: work-around in lieu of PingRequestHandler
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@574605 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2b25ec85ef
commit
7f54a7c94e
|
@ -63,11 +63,23 @@ public abstract class SolrResponseBase implements SolrResponse
|
|||
|
||||
// these two methods are based on the logic in SolrCore.setResponseHeaderValues(...)
|
||||
public int getStatus() {
|
||||
return (Integer) getResponseHeader().get("status");
|
||||
NamedList header = getResponseHeader();
|
||||
if (header != null) {
|
||||
return (Integer) header.get("status");
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int getQTime() {
|
||||
return (Integer) getResponseHeader().get("QTime");
|
||||
NamedList header = getResponseHeader();
|
||||
if (header != null) {
|
||||
return (Integer) header.get("QTime");
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public String getRequestUrl() {
|
||||
|
|
Loading…
Reference in New Issue