lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrRelevancyFAQ" by YonikSeeley
Date Fri, 23 Oct 2009 01:24:46 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrRelevancyFAQ" page has been changed by YonikSeeley.
The comment on this change is: add boosting dismax example.
http://wiki.apache.org/solr/SolrRelevancyFAQ?action=diff&rev1=15&rev2=16

--------------------------------------------------

  
  Now the main "q" argument as well as the "dateboost" argument may be specified as defaults
in a search handler in solrconfig.xml, and clients would only need to pass "qq", the user
query.
  
+ To boost another query type such as a dismax query, the value of the boost query is a full
sub-query and hence can use the {!querytype} syntax. Alternately, the defType param can be
used in the boost local params to set the default type to dismax.  The other dismax parameters
may be set as top level parameters.
+ {{{
+ http://localhost:8983/solr/select?q={!boost b=$dateboost v=$qq defType=dismax}&dateboost=recip(ms(NOW,manufacturedate_dt),3.16e-11,1,1)&qf=text&pf=text&qq=ipod
+ }}}
  
  == How do I give a very low boost to documents that match my query ==
  In general the problem is that a "low" boost is still a boost, it can only improve the score
of documents that match. One way to fake a "negative boost" is to give a high boost to everything
that does *not* match. For example:

Mime
View raw message