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 Marc Sturlese <ma...@gmail.com> on 2010/02/01 17:04:02 UTC

weird behabiour when setting negative boost with bq using dismax

I already asked about this long ago but the answer doesn't seem to work...
I am trying to set a negative query boost to send the results that match
field_a: 54 to a lower position. I have tried it in 2 different ways:

bq=(*:* -field_a:54^10000) 
bq=-field_a:54^10000 

None of them seem to work. What seems to happen is that results that match
field_a:54 are excluded. Just like doing:

fq=-field_a:54

Any idea what could be happening? Has anyone experienced this behaviour
before?
Thnaks in advance
-- 
View this message in context: http://old.nabble.com/weird-behabiour-when-setting-negative-boost-with-bq-using-dismax-tp27406614p27406614.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: weird behabiour when setting negative boost with bq using dismax

Posted by Marc Sturlese <ma...@gmail.com>.
>Generally speaking, by convention boosts in Lucene have unity at 1.0,
>not 0.0. So, a "negative boost" is usually done with boosts between 0
>and 1. For this case, maybe a boost of 0.00001 is what you want?
I forgot to say I tried what you say aswell but didn't work.

>In the standard query parser, this means "remove all entries in which
>field_a = 54".
>> bq=-field_a:54^10000
In DisMaxQueryParser bq is a boosting function. It should affect the boost
of the results but not the number of it. I think what you mean is:
fq=-field_a:54

Still stuck whit this...




Lance Norskog-2 wrote:
> 
> In the standard query parser, this means "remove all entries in which
> field_a = 54".
> 
>> bq=-field_a:54^10000
> 
> Generally speaking, by convention boosts in Lucene have unity at 1.0,
> not 0.0. So, a "negative boost" is usually done with boosts between 0
> and 1. For this case, maybe a boost of 0.00001 is what you want?
> 
> On Mon, Feb 1, 2010 at 8:04 AM, Marc Sturlese <ma...@gmail.com>
> wrote:
>>
>> I already asked about this long ago but the answer doesn't seem to
>> work...
>> I am trying to set a negative query boost to send the results that match
>> field_a: 54 to a lower position. I have tried it in 2 different ways:
>>
>> bq=(*:* -field_a:54^10000)
>> bq=-field_a:54^10000
>>
>> None of them seem to work. What seems to happen is that results that
>> match
>> field_a:54 are excluded. Just like doing:
>>
>> fq=-field_a:54
>>
>> Any idea what could be happening? Has anyone experienced this behaviour
>> before?
>> Thnaks in advance
>> --
>> View this message in context:
>> http://old.nabble.com/weird-behabiour-when-setting-negative-boost-with-bq-using-dismax-tp27406614p27406614.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Lance Norskog
> goksron@gmail.com
> 
> 

-- 
View this message in context: http://old.nabble.com/weird-behaviour-when-setting-negative-boost-with-bq-using-dismax-tp27406614p27449405.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: weird behabiour when setting negative boost with bq using dismax

Posted by Lance Norskog <go...@gmail.com>.
In the standard query parser, this means "remove all entries in which
field_a = 54".

> bq=-field_a:54^10000

Generally speaking, by convention boosts in Lucene have unity at 1.0,
not 0.0. So, a "negative boost" is usually done with boosts between 0
and 1. For this case, maybe a boost of 0.00001 is what you want?

On Mon, Feb 1, 2010 at 8:04 AM, Marc Sturlese <ma...@gmail.com> wrote:
>
> I already asked about this long ago but the answer doesn't seem to work...
> I am trying to set a negative query boost to send the results that match
> field_a: 54 to a lower position. I have tried it in 2 different ways:
>
> bq=(*:* -field_a:54^10000)
> bq=-field_a:54^10000
>
> None of them seem to work. What seems to happen is that results that match
> field_a:54 are excluded. Just like doing:
>
> fq=-field_a:54
>
> Any idea what could be happening? Has anyone experienced this behaviour
> before?
> Thnaks in advance
> --
> View this message in context: http://old.nabble.com/weird-behabiour-when-setting-negative-boost-with-bq-using-dismax-tp27406614p27406614.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
Lance Norskog
goksron@gmail.com

Re: weird behabiour when setting negative boost with bq using dismax

Posted by Marc Sturlese <ma...@gmail.com>.
>: bq=(*:* -field_a:54^10000) 

>I think what you want there is bq=(*:* -field_a:54)^10000

>...you are "boosting" things that don't match "field_a:54" 

Thanks Hoss. I've updated the Wiki, the content of the bq param was wrong:
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_do_I_give_a_very_low_boost_to_documents_that_match_my_query

hossman wrote:
> 
> 
> : bq=(*:* -field_a:54^10000) 
> 
> I think what you want there is bq=(*:* -field_a:54)^10000
> 
> ...you are "boosting" things that don't match "field_a:54" 
> 
> adding a boost value "^10000" to a negated clause doesn't do much (except 
> maybe make hte queryNorm really wacky)
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/weird-behaviour-when-setting-negative-boost-with-bq-using-dismax-tp27406614p27461856.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: weird behabiour when setting negative boost with bq using dismax

Posted by Chris Hostetter <ho...@fucit.org>.
: bq=(*:* -field_a:54^10000) 

I think what you want there is bq=(*:* -field_a:54)^10000

...you are "boosting" things that don't match "field_a:54" 

adding a boost value "^10000" to a negated clause doesn't do much (except 
maybe make hte queryNorm really wacky)


-Hoss