From b083a2f5300faa4a2f35164e8a6199a1e5a9f05d Mon Sep 17 00:00:00 2001 From: David Wayne Smiley Date: Wed, 28 Mar 2012 03:59:01 +0000 Subject: [PATCH] SOLR-3283 PingRequestHandler make qt optional git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306140 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/solr/handler/PingRequestHandler.java | 5 ++--- solr/example/solr/conf/solrconfig.xml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java index 5013e00a72a..d46beeb7642 100644 --- a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java @@ -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 ) { diff --git a/solr/example/solr/conf/solrconfig.xml b/solr/example/solr/conf/solrconfig.xml index f7651a9d171..c8ea9a385da 100755 --- a/solr/example/solr/conf/solrconfig.xml +++ b/solr/example/solr/conf/solrconfig.xml @@ -1040,7 +1040,6 @@ - search solrpingquery