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@574600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
31480199dd
commit
2b25ec85ef
|
@ -83,6 +83,9 @@ public class XMLResponseParser implements ResponseParser
|
|||
if( name.equals( "response" ) || name.equals( "result" ) ) {
|
||||
response = readNamedList( parser );
|
||||
}
|
||||
else if( name.equals( "solr" ) ) {
|
||||
return new NamedList<Object>();
|
||||
}
|
||||
else {
|
||||
throw new Exception( "really needs to be response or result. " +
|
||||
"not:"+parser.getLocalName() );
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.Collection;
|
|||
import org.apache.solr.client.solrj.SolrServer;
|
||||
import org.apache.solr.client.solrj.SolrServerException;
|
||||
import org.apache.solr.client.solrj.response.SolrPingResponse;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.common.params.SolrParams;
|
||||
import org.apache.solr.common.util.ContentStream;
|
||||
|
||||
|
@ -43,7 +44,9 @@ public class SolrPing extends RequestBase
|
|||
}
|
||||
|
||||
public SolrParams getParams() {
|
||||
return null;
|
||||
ModifiableSolrParams params = new ModifiableSolrParams();
|
||||
params.set( "q", "solrpingquery" );
|
||||
return params;
|
||||
}
|
||||
|
||||
public SolrPingResponse process( SolrServer server ) throws SolrServerException, IOException
|
||||
|
|
Loading…
Reference in New Issue