lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Rochkind <rochk...@jhu.edu>
Subject RE: Boosting DisMax queries with !boost component
Date Mon, 02 Aug 2010 03:11:51 GMT
> qf needs to have spaces in it, unfortunately the local query parser can not
> deal with that, as Erik Hatcher mentioned some months ago.

By "local query parser", you mean what I call the LocalParams stuff (for lack of being sure
of the proper term)?  You can put spaces in there, you just need to put it in quotes (single
or double). I've been doing it with no problems.  I forget if backslash-escaping is also possible
there, it may be, but that would get extra confusing if you have a nested query AND local
params, which is my case. But using single quotes for one and double for the other works fine:

Your q equals the URI encoded form of:  _query_: "{!dismax qf='something^10 other^100'}some
query"

Ie:

 &q=_query_%3A%22%7B%21dismax+qf%3D%27something%5E10+other%5E100%27%7Dsome+query%22%29

Can get confusing to make sure you've got all the escaping right, especially when you're constructing
the query in software that itself needs to have quotes escaped, but it works fine if you get
it all right. Mitch's suggestion may indeed be less confusing if there's no reason in your
context not to use it (there was in mine). 

> {!dismax%20qf=$yourqf}yourQuery&yourgf=title^1.0 tags^2.0

Jonathan
Mime
View raw message