Hi,

I tested the BoostQueryParser and it works on the simplified example.
But we need to keep the edismax Query parser, so I tried the following query 
and it seems to work (I defined a local bf='' for qq).

&q=beautiful Christmas tree
&mm=2
&qf=title^12 description^2
&defType=edismax
&bf=map(query($qq),0,0,0,100.0)
&qq={!edismax bf='' mm=100%}beautiful Christmas tree

Best regards,
Anca

On 01/07/2014 07:42 PM, Ahmet Arslan wrote:

Hi Hoss,

Thanks for the explanation. Very complicated stuff. I never understand 
NestedQParserPlugin.

We want all the documents with all terms (mm=100%) get an extra 1000 points, 
but change nothing else. How would you restructure the following query?

q=beautiful Christmas tree&mm=2&qf=title^12 
description^2&defType=dismax&bf=map(query($qq),0,0,0,100.0)&qq={!dismax qf='title 
description' mm=100%}beautiful Christmas tree

Ahmet


On Tuesday, January 7, 2014 8:12 PM, Chris Hostetter 
<hossman_luc...@fucit.org><mailto:hossman_luc...@fucit.org> wrote:


: http://localhost:8983/solr/collection1/select?q=ipod
: 
belkin&wt=xml&debugQuery=true&q.op=AND&defType=edismax&bf=map(query($qq),0,0,0,100.0)&qq={!edismax}power
:
: The error is :
: org.apache.solr.search.SyntaxError: Infinite Recursion detected parsing query
: 'power'
:
: And the stacktrace :
:
: ERROR - 2014-01-06 18:27:02.275; org.apache.solr.common.SolrException;
: org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError:
: Infinite Recursion detected parsing query 'power'

your "qq" param uses the edismax parser which goes looking for a "bf" -
since there is no local bf param, it finds the global one -- which
recursively refers to the "qq" param again.  Hence the infinite recursion.

You either need to override the bf param locally in your qq param, or
restructure your query slightly so the bf is not global

Perhaps something like this...

qq=ipod belkin
q={!query defType=edismax bf=$boostFunc v=$qq}
boostFunc=map(query($boostQuery),0,0,0,100.0)
boostQuery={!edismax}power

having said that however: instead of using "bf" you should probably
consider using the "boost" parser -- it's a multiplicitive boost instead
of an additive boost, and (in my opinion) makes the flow/params easier to
understand...

https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-BoostQueryParser

qq=ipod belkin
q={!boost defType=edismax b=$boostFunc v=$qq}
boostFunc=map(query($boostQuery),0,0,0,100.0)
boostQuery={!edismax}power



-Hoss
http://www.lucidworks.com/




________________________________
Kelkoo SAS
Société par Actions Simplifiée
Au capital de € 4.168.964,30
Siège social : 8, rue du Sentier 75002 Paris
425 093 069 RCS Paris

Ce message et les pièces jointes sont confidentiels et établis à l'attention 
exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce 
message, merci de le détruire et d'en avertir l'expéditeur.

Reply via email to