On 11/12/2013 6:03 PM, Abhijith Jain -X (abhijjai - DIGITAL-X INC at
Cisco) wrote:
I am trying to set the query to q=*:* permanently. I tried to set q=*:* in
SolrConfig.xml file as follows.
<requestHandler name="standard" class="solr.SearchHandler" default="true">
<lst name="defaults">
<str name="echoParams">none</str>
<str name="q">*:*</str>
</lst>
</requestHandler>
But this didn’t help. Please advise how to change query to q=*:* in Solr 4.4.
This configuration sets the default for the q parameter to *:*, but if
the actual query that is sent to Solr has a q parameter, it will
override that default.
In the very unlikely situation that you don't want to ever do any query
besides *:*, you can put that setting into the invariants section
instead of the defaults section - but be aware that if you do that, you
will never be able to send any other query.Normally your application
decides what the query string should be, not Solr.
I concur with Jack's recommendation that you migrate to the 4.x way of
naming handlers. You would need to set handleSelect to false and change
all your search handlers so their name starts with a slash. The one
that is currently named "standard" would instead be named "/select" and
you would need to remove the default="true" setting.
Thanks,
Shawn