Hi: First of all I have to say that I had never heard about *\* as the query to get all the documents in a index but *:* (maybe I'm wrong) . Re-reading "Apache Solr 4 cookbook", "Solr 1.4 Enterprise Search Server" and " Apache Solr 3 Enterprise Search Server" there is no trace for the query *\* as the universal query to get every doc.
If you enable debugQuery<http://wiki.apache.org/solr/CommonQueryParameters#debugQuery> you can see that *:* is transformed into "MatchAllDocsQuery(*:*) (Solr1.4 and Solr4.4) wich means give me all the documents, but the query *\* is transformed into other thing (In my case having a default field called description defined in the schema) I get in Solr1.4 description:*\\* wich means give all the documents that have the char \ in the field description and in SOLR1.4 I get description:** which also gets all the documents in the index. It would be helpful to see how is interpreted *\* in your system (solr3.5 and solr4). I think, the best way to solve your problem Is to modify the system which launches the request to SOLR and modify *\* by *:* (if it is possible). I dont know if SOLR can make that kind of translation, I mean change *\* by *:*. One possible workaround with collateral damages is the inclusion of a PatternReplaceCharFilterFactory (in schema.xml) within the fieldtypes you use to search in order to delete every \ character included in the input or even include the expression to transform *\* into *:* . But including that element in your schema means that it will always be used during your search (thus if your users type a\b they will search ab). If you want to explore that path I recommend you to use the analysis tool<https://cwiki.apache.org/confluence/display/solr/Analysis+Screen>included in solr. Regards. On Wed, Nov 13, 2013 at 2:34 AM, Shawn Heisey <s...@elyograg.org> wrote: > 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 > >