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:
William Au 2007-09-11 14:08:39 +00:00
parent 31480199dd
commit 2b25ec85ef
2 changed files with 7 additions and 1 deletions

View File

@ -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() );

View File

@ -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