{! boost ...} factor with a legible query analyzer

How can I use multiplier q={!boost ...}with smax request parser?

With a standard query, you can:

?q={!boost b=$multiplier}text:foo
&multiplier=...

However, when I try to make an equivalent for smax:

?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 assume that the indication {!boost ...}inside qredefines defType=dismaxand forces the remainder to be qparsed using a standard query analyzer. How can I use {!boost ...}with a blank?

NOTE. I am running Solr 4.10.4.

+4
source share
1 answer

According to Frequently Asked Questions about Solr Question: How can I increase the number of new documents ,

, , , boost , , {! queryParser}. defType boost, . .

, smax ( ) :

?q={!boost b=$multiplier v=$qq}
&qq={!dismax}foo
&qf=text
&multiplier=...

:

?q={!boost b=$multiplier defType=dismax}foo
&qf=text
&multiplier=...
+2

All Articles