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 sunnyfr <jo...@gmail.com> on 2009/02/18 16:40:56 UTC

boost qf weight between 0 and 10

Hi,

I don't get really, I try to boost a field according to another one but I've
a huge weight when I'm using qf boost like :

/select?qt=dismax&fl=*&q="obama
meeting"&debugQuery=true&qf=title&bf=product(title,stat_views)

I will have :
5803681.0 = (MATCH) sum of:
  4.9400806 = weight(title:"obama meet" in 8216294), product of:
    0.98198587 = queryWeight(title:"obama meet"), product of:
      16.098255 = idf(title: obama=7654 meet=7344)
      0.06099952 = queryNorm
    5.0307045 = fieldWeight(title:"obama meet" in 8216294), product of:
      1.0 = tf(phraseFreq=1.0)
      16.098255 = idf(title: obama=7654 meet=7344)
      0.3125 = fieldNorm(field=title, doc=8216294)
  0.40961993 = weight(text:"obama meet"~100^0.2 in 8216294), product of:
    0.17883755 = queryWeight(text:"obama meet"~100^0.2), product of:
      0.2 = boost
      14.658932 = idf(text: obama=12446 meet=19052)
      0.06099952 = queryNorm
    2.2904582 = fieldWeight(text:"obama meet" in 8216294), product of:
      1.0 = tf(phraseFreq=1.0)
      14.658932 = idf(text: obama=12446 meet=19052)
      0.15625 = fieldNorm(field=text, doc=8216294)
  5803675.5 = (MATCH) FunctionQuery(product(ord(title),sint(stat_views))),
product of:
    9.5142968E7 = product(ord(title)=1119329,sint(stat_views)=85)
    1.0 = boost
    0.06099952 = queryNorm



But this is not equilibrate between this boost in qf and bf, how can I do ?

Thanks a lot

-- 
View this message in context: http://www.nabble.com/boost-qf-weight-between-0-and-10-tp22081396p22081396.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: boost qf weight between 0 and 10

Posted by sunnyfr <jo...@gmail.com>.
How can I get the weight of a field and use it in bf ?? 
thanks a lot


sunnyfr wrote:
> 
> Hi Hoss, 
> thanks for this answser, and is there a way to get the weight of a field ? 
> like that and use it in the bf? queryWeight
> 
> 
>   0.14232224 = (MATCH) weight(text:chien^0.2 in 9412049), product of:
>     0.0813888 = queryWeight(text:chien^0.2), product of:
>       0.2 = boost
>       6.5946517 = idf(docFreq=55585, numDocs=14951742)
>       0.061708186 = queryNorm
> 
> 
> thanks 
> 
> 
> hossman wrote:
>> 
>> 
>> : I don't get really, I try to boost a field according to another one but
>> I've
>> : a huge weight when I'm using qf boost like :
>> : 
>> : /select?qt=dismax&fl=*&q="obama
>> : meeting"&debugQuery=true&qf=title&bf=product(title,stat_views)
>> 
>> bf is a boost function -- you are using a product fucntion to multiply
>> the 
>> "title" field by the stat_views" field ... this doesn't make sense to me?
>> 
>> i'm assuming the "title" field contains text (the rest of your score 
>> explanation confirms this).  when you try to do a math function on a 
>> string based field it deals with the "ordinal" value -- the higher the 
>> string is lexigraphically compared to all other docs ,the higher the 
>> ordinal value.
>> 
>> i have no idea what's in your stat_views field -- but i can't imagine any 
>> way in which multipling it by the ordinal value of your text field would 
>> make sense...
>> 
>> :   5803675.5 = (MATCH)
>> FunctionQuery(product(ord(title),sint(stat_views))),
>> : product of:
>> :     9.5142968E7 = product(ord(title)=1119329,sint(stat_views)=85)
>> :     1.0 = boost
>> :     0.06099952 = queryNorm
>> 
>> : But this is not equilibrate between this boost in qf and bf, how can I
>> do ?
>> 
>> when it comes to function query, you're on your own to figure out an 
>> appropriate query boost to blanace the scores out -- when you use a 
>> product function the scores are going to get huge like this unless you 
>> balance it somehow (and that ord(title) is just making this massively 
>> worse)
>> 
>> 
>> -Hoss
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/boost-qf-weight-between-0-and-10-tp22081396p23293956.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: boost qf weight between 0 and 10

Posted by sunnyfr <jo...@gmail.com>.
Hi Hoss, 
thanks for this answser, and is there a way to get the weight of a field ? 
like that and use it in the bf? queryWeight


  0.14232224 = (MATCH) weight(text:chien^0.2 in 9412049), product of:
    0.0813888 = queryWeight(text:chien^0.2), product of:
      0.2 = boost
      6.5946517 = idf(docFreq=55585, numDocs=14951742)
      0.061708186 = queryNorm


thanks 


hossman wrote:
> 
> 
> : I don't get really, I try to boost a field according to another one but
> I've
> : a huge weight when I'm using qf boost like :
> : 
> : /select?qt=dismax&fl=*&q="obama
> : meeting"&debugQuery=true&qf=title&bf=product(title,stat_views)
> 
> bf is a boost function -- you are using a product fucntion to multiply the 
> "title" field by the stat_views" field ... this doesn't make sense to me?
> 
> i'm assuming the "title" field contains text (the rest of your score 
> explanation confirms this).  when you try to do a math function on a 
> string based field it deals with the "ordinal" value -- the higher the 
> string is lexigraphically compared to all other docs ,the higher the 
> ordinal value.
> 
> i have no idea what's in your stat_views field -- but i can't imagine any 
> way in which multipling it by the ordinal value of your text field would 
> make sense...
> 
> :   5803675.5 = (MATCH)
> FunctionQuery(product(ord(title),sint(stat_views))),
> : product of:
> :     9.5142968E7 = product(ord(title)=1119329,sint(stat_views)=85)
> :     1.0 = boost
> :     0.06099952 = queryNorm
> 
> : But this is not equilibrate between this boost in qf and bf, how can I
> do ?
> 
> when it comes to function query, you're on your own to figure out an 
> appropriate query boost to blanace the scores out -- when you use a 
> product function the scores are going to get huge like this unless you 
> balance it somehow (and that ord(title) is just making this massively 
> worse)
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/boost-qf-weight-between-0-and-10-tp22081396p23257545.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: boost qf weight between 0 and 10

Posted by Chris Hostetter <ho...@fucit.org>.
: I don't get really, I try to boost a field according to another one but I've
: a huge weight when I'm using qf boost like :
: 
: /select?qt=dismax&fl=*&q="obama
: meeting"&debugQuery=true&qf=title&bf=product(title,stat_views)

bf is a boost function -- you are using a product fucntion to multiply the 
"title" field by the stat_views" field ... this doesn't make sense to me?

i'm assuming the "title" field contains text (the rest of your score 
explanation confirms this).  when you try to do a math function on a 
string based field it deals with the "ordinal" value -- the higher the 
string is lexigraphically compared to all other docs ,the higher the 
ordinal value.

i have no idea what's in your stat_views field -- but i can't imagine any 
way in which multipling it by the ordinal value of your text field would 
make sense...

:   5803675.5 = (MATCH) FunctionQuery(product(ord(title),sint(stat_views))),
: product of:
:     9.5142968E7 = product(ord(title)=1119329,sint(stat_views)=85)
:     1.0 = boost
:     0.06099952 = queryNorm

: But this is not equilibrate between this boost in qf and bf, how can I do ?

when it comes to function query, you're on your own to figure out an 
appropriate query boost to blanace the scores out -- when you use a 
product function the scores are going to get huge like this unless you 
balance it somehow (and that ord(title) is just making this massively 
worse)


-Hoss


Re: boost qf weight between 0 and 10

Posted by sunnyfr <jo...@gmail.com>.
Obviously it should be qb and not bf ???? it looks better.
Is there everything in the wiki because I read it but I'm still a bit
confused about it.



sunnyfr wrote:
> 
> Hi,
> 
> I don't get really, I try to boost a field according to another one but
> I've a huge weight when I'm using qf boost like :
> 
> /select?qt=dismax&fl=*&q="obama
> meeting"&debugQuery=true&qf=title&bf=product(title,stat_views)
> 
> I will have :
> 5803681.0 = (MATCH) sum of:
>   4.9400806 = weight(title:"obama meet" in 8216294), product of:
>     0.98198587 = queryWeight(title:"obama meet"), product of:
>       16.098255 = idf(title: obama=7654 meet=7344)
>       0.06099952 = queryNorm
>     5.0307045 = fieldWeight(title:"obama meet" in 8216294), product of:
>       1.0 = tf(phraseFreq=1.0)
>       16.098255 = idf(title: obama=7654 meet=7344)
>       0.3125 = fieldNorm(field=title, doc=8216294)
>   0.40961993 = weight(text:"obama meet"~100^0.2 in 8216294), product of:
>     0.17883755 = queryWeight(text:"obama meet"~100^0.2), product of:
>       0.2 = boost
>       14.658932 = idf(text: obama=12446 meet=19052)
>       0.06099952 = queryNorm
>     2.2904582 = fieldWeight(text:"obama meet" in 8216294), product of:
>       1.0 = tf(phraseFreq=1.0)
>       14.658932 = idf(text: obama=12446 meet=19052)
>       0.15625 = fieldNorm(field=text, doc=8216294)
>   5803675.5 = (MATCH) FunctionQuery(product(ord(title),sint(stat_views))),
> product of:
>     9.5142968E7 = product(ord(title)=1119329,sint(stat_views)=85)
>     1.0 = boost
>     0.06099952 = queryNorm
> 
> 
> 
> But this is not equilibrate between this boost in qf and bf, how can I do
> ?
> 
> Thanks a lot
> 
> 

-- 
View this message in context: http://www.nabble.com/boost-qf-weight-between-0-and-10-tp22081396p22081479.html
Sent from the Solr - User mailing list archive at Nabble.com.