How can I use the q={!boost ...}
multiplier with the dismax query parser?
With a standard query, you can do:
?q={!boost b=$multiplier}text:foo
&multiplier=...
However, when I try to do the equivalent for dismax:
?defType=dismax
&q={!boost b=$multiplier}foo
&qf=text
&multiplier=...
I get the following error:
{
"error": {
"msg": "no field name specified in query and no default specified via 'df' param",
"code": 400
}
}
I'm guessing that specifying {!boost ...}
within q
overrides defType=dismax
and causes the remaining portion of q
to be parsed using the standard query parser. How can I use {!boost ...}
with dismax?
NOTE: I'm running Solr 4.10.4.