Hi Jack! Yes, that was my point, I was thinking that being edismax an extended version of dismas, perhaps had a switch to turn on/off this feature or putting some limits. I've tried the multiterm approach but with no luck, the "*" keeps being treated a match all query, as far as I can see from enabling debug output:
"rawquerystring": "*", "querystring": "*", "parsedquery": "(+MatchAllDocsQuery(*:*) () FunctionQuery(1.0/(3.16E-11*float(ms(const(1421989200000),date(lastModified)))+1.0)))/no_coord", The query gets translated into a MatchAllDocsQuery, which I think happens before the textual analysis. ----- Original Message ----- From: "Jack Krupansky" <jack.krupan...@gmail.com> To: solr-user@lucene.apache.org Sent: Friday, January 23, 2015 12:02:44 AM Subject: Re: Avoiding wildcard queries using edismax query parser The dismax query parser does not support wildcards. It is designed to be simpler. -- Jack Krupansky On Thu, Jan 22, 2015 at 5:57 PM, Jorge Luis Betancourt González < jlbetanco...@uci.cu> wrote: > I was also suspecting something like that, the odd thing was that the with > the dismax parser this seems to work, I mean passing a single * in the > query just like: > > > http://localhost:8983/solr/collection1/select?q=*&wt=json&indent=true&defType=dismax > > Returns: > > { > "responseHeader":{ > "status":0, > "QTime":3}, > "response":{"numFound":0,"start":0,"docs":[] > }, > "highlighting":{} > } > > Which is consisten with no "*" term indexed. > > Based on what I saw with dismax, I though that perhaps a configuration > option existed to accomplish the same with the edismax query parser, but I > haven't found such option. > > I'm going to test with a custom search component. > > Thanks for the quick response Alex, > > Regards, > > ----- Original Message ----- > From: "Alexandre Rafalovitch" <arafa...@gmail.com> > To: "solr-user" <solr-user@lucene.apache.org> > Sent: Thursday, January 22, 2015 4:46:08 PM > Subject: Re: Avoiding wildcard queries using edismax query parser > > I suspect the special characters get caught before the analyzer chains. > > But what about pre-pending a custom search components? > > Regards, > Alex. > ---- > Sign up for my Solr resources newsletter at http://www.solr-start.com/ > > > On 22 January 2015 at 16:33, Jorge Luis Betancourt González > <jlbetanco...@uci.cu> wrote: > > Hello all, > > > > Currently we are using edismax query parser in an internal application, > we've detected that some wildcard queries including "*" are causing some > performance issues and for this particular case we're not interested in > allowing any user to request all the indexed documents. > > > > This could be easily escaped in the application level, but right now we > have several applications (using several programming languages) consuming > from Solr, and adding this into each application is kind of exhausting, so > I'm wondering if there is some configuration that allow us to treat this > special characters as normal alphanumeric characters. > > > > I've tried one solution that worked before, involving the > WordDelimiterFilter an the types attribute: > > > > <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" > generateNumberParts="0" catenateWords="0" > > catenateNumbers="0" catenateAll="0" splitOnCaseChange="0" > preserveOriginal="0" types="characters.txt" /> > > > > and in characters.txt I've mapped the special characters into ALPHA: > > > > + => ALPHA > > * => ALPHA > > > > Any thoughts on this? > > > > > > --------------------------------------------------- > > XII Aniversario de la creación de la Universidad de las Ciencias > Informáticas. 12 años de historia junto a Fidel. 12 de diciembre de 2014. > > > > > --------------------------------------------------- > XII Aniversario de la creación de la Universidad de las Ciencias > Informáticas. 12 años de historia junto a Fidel. 12 de diciembre de 2014. > > --------------------------------------------------- XII Aniversario de la creación de la Universidad de las Ciencias Informáticas. 12 años de historia junto a Fidel. 12 de diciembre de 2014.