: > Deja-Vu...
:
: >
http://www.lucidimagination.com/search/document/3551f130b6772799/excluding_docs_from_results_based_on_matched_field
:
: > -Hoss
:
: Thanks for the answer, the problem is that the query like this:
:
: q=foo&defType=dismax&qf=title&bq={!dismax qf='title desc' v=$q}
:
: causes exception in Solr - "infinite recursion detected".
Hmmm, yeah ... that makes sense given the way local params work (although
i'm amazed Solr actually detects it instead of just crashing -- the local
param parsing is smarter then i thought!)
Assuming this is what i think it is, it's because the "inner" dismax query
is looking for a "bq" param, which is leading to infinite recursion
because there is no bq local param -- if you specify bf='' inside the
{!dismax} that error should go away (but you may still not get the results
you expect if you also have other top level dismax params like pf, etc...
http://www.lucidimagination.com/search/document/a60e420f5c3d8365/searching_for_terms_on_specific_fields#a60e420f5c3d8365
You should be able to bypass the kind of thing entirely by making *both*
of the dismax queries nested queries of some other top level query (so
they can't possibly inherit params from eachother) instead of using bq ...
qq = foo
q = +_query_:"$main" _query_:"$extra"
main = {!dismax ... v=$qq}
extra = {!dismax ... v=$qq}
-Hoss