lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Boost Query (bq) syntax/usage
Date Tue, 30 Sep 2014 21:53:11 GMT
A boost is basically an "OR" operation - it doesn't select any more or fewer 
documents. So, three separate bq's are three OR terms. But your first bq is 
a single query that ANDs three terms, and that AND-ed query is OR-ed with 
the original query, so it only boosts documents that contain all three of 
the terms rather than any of the three terms.

-- Jack Krupansky

-----Original Message----- 
From: shamik
Sent: Tuesday, September 30, 2014 5:38 PM
To: solr-user@lucene.apache.org
Subject: Boost Query (bq) syntax/usage

Hi,

  I'm little confused with the right syntax of defining boost queries. If I
use them in the following way:

http://localhost:8983/solr/testhandler?q=Application+Manager&bq=(Source2:sfdc^6
Source2:downloads^5 Source2:topics^3)&debugQuery=true

it gets translated to -->

<arr name="parsed_boost_queries">
   <str>
       +Source2:sfdc^6.0 +Source2:downloads^5.0 +Source2:topics^3.0
   </str>
</arr>

Now, if I use the following query:

http://localhost:8983/solr/testhandler?q=Application+Manager&bq=Source2:sfdc^6&bq=Source2:downloads^5&bq=Source2:topics^3&debugQuery=true

gets translated as -->

<arr name="parsed_boost_queries">
    <str>Source2:sfdc^6.0</str>
    <str>Source2:downloads^5.0</str>
    <str>Source2:topics^3.0</str>
</arr>

Both queries generate different result in terms of relevancy. Just wondering
what is the right way of using bq ?

-Thanks



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Boost-Query-bq-syntax-usage-tp4161988.html
Sent from the Solr - User mailing list archive at Nabble.com. 


Mime
View raw message