You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Romi <ro...@gmail.com> on 2011/07/05 08:38:51 UTC

How to boost a querystring at query time

i want to enable boosting for query and search results. My dismax
queryHandlerConfiguration is as:

*<requestHandler name="dismax" class="solr.DisMaxRequestHandler"   >
    <lst name="defaults">
     <str name="echoParams">explicit</str>
      <str name="defType">dismax</str> 
     <float name="tie">0.01</float>
     <str name="qf">
        text^0.5 name^1.0 description^1.5 
     </str>
    <str name="fl">
        UID_PK,name,price,description,score
     </str>
     <str name="mm">
        2&lt;-1 5&lt;-2 6&lt;90%
     </str>
     <int name="ps">100</int>
     <str name="q.alt">*:*</str>
     <str name="f.name.hl.fragsize">0</str>
    <str name="f.name.hl.alternateField">name</str>
     <str name="f.text.hl.fragmenter">regex</str>
    </lst>
  </requestHandler>*


When querystring is q=gold^2.0 ring(boost gold) and qt=standard i got the
results for gold ring and when qt=dismax i got no result why so please
explain




-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-boost-a-querystring-at-query-time-tp3139800p3139800.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to boost a querystring at query time

Posted by Ahmet Arslan <io...@yahoo.com>.
> than what should i do to get the
> required result. ie. if i want to boost gold
> than which querytype i should use.

If you want to boost the keyword 'gold', you can use bq parameter.

defType=dismax&bq=someField:gold^100

See the other parameters : 
http://wiki.apache.org/solr/DisMaxQParserPlugin#bq_.28Boost_Query.29

Re: How to boost a querystring at query time

Posted by Romi <ro...@gmail.com>.
than what should i do to get the required result. ie. if i want to boost gold
than which querytype i should use.

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-boost-a-querystring-at-query-time-tp3139800p3140703.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to boost a querystring at query time

Posted by Ahmet Arslan <io...@yahoo.com>.
> When querystring is q=gold^2.0 ring(boost gold) and
> qt=standard i got the
> results for gold ring and when qt=dismax i got no result
> why so please
> explain

q=gold^2.0 ring(boost gold)&defType=dismax would return a document that contains exactly "gold^2.0 ring(boost gold)" in it.

dismax is designed to work with simple keyword queries. You can use only three special characters: + - "

Rest of the characters, : [ ] ^ ~ etc, don't work. i.e. they are escaped.

Please see http://www.lucidimagination.com/blog/2010/05/23/whats-a-dismax/