SOLR-3283 PingRequestHandler make qt optional

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306140 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David Wayne Smiley 2012-03-28 03:59:01 +00:00
parent d5fd5562cb
commit b083a2f530
2 changed files with 2 additions and 4 deletions

View File

@ -39,7 +39,6 @@ public class PingRequestHandler extends RequestHandlerBase
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
{
SolrParams params = req.getParams();
SolrParams required = params.required();
SolrCore core = req.getCore();
// Check if the service is available
@ -49,11 +48,11 @@ public class PingRequestHandler extends RequestHandlerBase
}
// Get the RequestHandler
String qt = required.get( CommonParams.QT );
String qt = params.get( CommonParams.QT );//optional; you get the default otherwise
SolrRequestHandler handler = core.getRequestHandler( qt );
if( handler == null ) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
"Unknown RequestHandler: "+qt );
"Unknown RequestHandler (qt): "+qt );
}
if( handler instanceof PingRequestHandler ) {

View File

@ -1040,7 +1040,6 @@
<!-- ping/healthcheck -->
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
<lst name="invariants">
<str name="qt">search</str>
<str name="q">solrpingquery</str>
</lst>
<lst name="defaults">