mirror of https://github.com/apache/lucene.git
SOLR-3283 PingRequestHandler make qt optional
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306703 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
859814a06f
commit
93522a23fd
|
@ -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 ) {
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue