Skip to content

Apache Lucene open-source search software

SOLR-3161 handleSelect=false by default now, and update solrconfig to not use it.

David Wayne Smileyafb77dd96b85
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
index a046633c03d..41a9c93cf35 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
@@ -63,7 +63,7 @@ public class SolrRequestParsers
private HashMap<String, SolrRequestParser> parsers;
private boolean enableRemoteStreams = false;
- private boolean handleSelect = true;
+ private boolean handleSelect = false;
private StandardRequestParser standard;
/**
diff --git a/solr/example/solr/conf/solrconfig.xml b/solr/example/solr/conf/solrconfig.xml
index a202ac6c367..d5167d6e4c8 100755
--- a/solr/example/solr/conf/solrconfig.xml
+++ b/solr/example/solr/conf/solrconfig.xml
@@ -617,17 +617,13 @@
This section contains instructions for how the SolrDispatchFilter
should behave when processing requests for this SolrCore.
- handleSelect affects the behavior of requests such as /select?qt=XXX
-
- handleSelect="true" will cause the SolrDispatchFilter to process
- the request and dispatch the query to a handler specified by the
- "qt" param
-
- handleSelect="false" will cause the SolrDispatchFilter to
- ignore "/select" requests, resulting in a 404 unless a handler
- is explicitly registered with the name "/select"
+ If you wish to regain use of /select?qt=... style request handler
+ dispatching, then first add handleSelect="true" to
+ <requestDispatcher>. Then change the name of the request handler
+ named "/select" to something else without a leading "/", such as
+ simply "select" and add default="true" to it.
-->
- <requestDispatcher handleSelect="true" >
+ <requestDispatcher>
<!-- Request Parsing
These settings indicate how Solr Requests may be parsed, and
@@ -708,16 +704,8 @@
http://wiki.apache.org/solr/SolrRequestHandler
- incoming queries will be dispatched to the correct handler
- based on the path or the qt (query type) param.
-
- Names starting with a '/' are accessed with the a path equal to
- the registered name. Names without a leading '/' are accessed
- with: http://host/app/[core/]select?qt=name
-
- If a /select request is processed with out a qt param
- specified, the requestHandler that declares default="true" will
- be used.
+ Incoming requests will be dispatched to the handler with a name
+ equal to the remainder of the URL path, starting with a '/'.
If a Request Handler is declared with startup="lazy", then it will
not be initialized until the first request that uses it.
@@ -732,7 +720,7 @@
of SearchComponents (see below) and supports distributed
queries across multiple shards
-->
- <requestHandler name="search" class="solr.SearchHandler" default="true">
+ <requestHandler name="/select" class="solr.SearchHandler">
<!-- default values for query parameters can be specified, these
will be overridden by parameters in the request
-->
@@ -1264,7 +1252,7 @@
In reality you will likely want to add the component to your
already specified request handlers.
-->
- <requestHandler name="tvrh" class="solr.SearchHandler" startup="lazy">
+ <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<bool name="tv">true</bool>
</lst>