Also note that the following is not doing what you want:

<str name="bq">-is_mp_parent_b:true^50.0</str>

You want something like:

<str name="bq">is_mp_parent_b:true^0.20</str>
 
for negative boosting use a boost that is less than 1.0.

Otis--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: "Dean Missikowski (Consultant), CLSA" <dean.missikow...@clsa.com>
> To: solr-user@lucene.apache.org
> Sent: Sunday, March 8, 2009 3:30:28 AM
> Subject: RE: Query Boosting using both BQ and BF 
> 
> Some more experiments have helped me answer my own questions.
> 
> > Q1. Can anyone confirm whether bf and bq can both 
> > be used together in solrconfig.xml?
> yes
> 
> > Q3. Can I have multiple bq parameters? If so, do I 
> > space-separate them as a single bq, or provide 
> > multiple BQs?
> Yes, multiple bq parameters work, space-separating multiple query terms
> in a single bq also works.
> 
> Here's a snippet of my solrconfig.xml:
> 
> published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^5.2 OR
> (published_date_d:[NOW-12MONTHS/DAY TO NOW/DAY+1DAY] AND
> report_type_id_i:10000004)^10.0 OR (published_date_d:[NOW-6MONTHS/DAY TO
> NOW/DAY+1DAY] AND is_printed_b:true)^4.0
> is_mp_parent_b:false^10.0
> recip(rord(published_date_d),20,5000,5)^5.5
> 
> 
> -----Original Message-----
> From: Dean Missikowski (Consultant), CLSA 
> Sent: 08/03/2009 12:01 PM
> To: solr-user@lucene.apache.org
> Subject: Query Boosting using both BQ and BF 
> 
> Hi,
> 
> I have a couple of questions related to query boosting using the dismax
> request handler. I'm using a recent 1.4 build (to take advantage of
> omitTf), and have also tried all of this with 1.3.
> 
> To apply a query-time boost to the previous 3 months of documents in my
> index I use:
> 
> published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^10.2
> 
> 
> And, to provide a boosting that helps rank recently documents higher I
> use:
> recip(rord(published_date_d),20,5000,5)^5.5
> 
> This seems to be working well.
> 
> But I have more boosting requirements.  For example, I need to boost
> documents that are tagged as printed. So, I tried to add another bq
> parameter:
> 
> is_printed_b:true^4.0
> 
> Also, tried to append this space-separated all in one bq parameter like
> this:
> published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^10.2
> is_printed_b:true^4.0 
> 
> Lastly, I need to apply a negative boost to documents of a certain type,
> so I use:
> -is_mp_parent_b:true^50.0
> 
> Not sure if it matters, but I have 
> defaultOperator="AND"/> in schema.xml 
> 
> None of those variations return expected results (it's like the bq is
> being applied as a filter instead of just applying boosts).
> 
> Q1. Can anyone confirm whether bf and bq can both be used together in
> solrconfig.xml?
> Q2. Is there a way I can do ths using only BF? How? 
> Q3. Can I have multiple bq parameters? If so, do I space-separate them
> as a single bq, or provide multiple BQs?
> Q3. Am I formulating my BQs that use Boolean fields correctly?
> 
> Any help or insights much appreciated,
> 
> Thanks Dean
> 
> CLSA CLEAN & GREEN: Please consider our environment before printing this 
> email.
> The content of this communication is subject to CLSA Legal and Regulatory 
> Notices. 
> These can be viewed at https://www.clsa.com/disclaimer.html or sent to you 
> upon 
> request.

Reply via email to