boost qf weight between 0 and 10

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

boost qf weight between 0 and 10

sunnyShiny06
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
Reply | Threaded
Open this post in threaded view
|

Re: boost qf weight between 0 and 10

sunnyShiny06
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
Reply | Threaded
Open this post in threaded view
|

Re: boost qf weight between 0 and 10

hossman
In reply to this post by sunnyShiny06

: 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

Reply | Threaded
Open this post in threaded view
|

Re: boost qf weight between 0 and 10

sunnyShiny06
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
Reply | Threaded
Open this post in threaded view
|

Re: boost qf weight between 0 and 10

sunnyShiny06
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