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 phoey <ph...@gmail.com> on 2010/09/03 11:34:08 UTC

Index time boosting

Hi there,

Im having some issues with my relevancy of some results. I have 5 fields,
with varying boost values and being copied into a copyfield "text" which is
used to be searched on 


<field name="i_title" type="alphaOnlySort" indexed="true" stored="true"
omitNorms="false"/>
<field name="i_authors" type="text_ws" indexed="true" stored="true"
omitNorms="false"/>
<field name="i_subjects" type="text_ws" indexed="true" stored="true"
omitNorms="false"/>
<field name="i_features" type="text_ws" indexed="true" stored="true"
omitNorms="false"/>
<field name="i_description" type="text_ws" indexed="true" stored="true"
omitNorms="false"/>


<field name="text" type="text" indexed="true" stored="false"
multiValued="true" />
...      
<copyField source="i_*" dest="text"/>

im sending each of these fields with the boost values (i_title is 20,
i_authors is 10 ... i_description is 1)

now the issue is that some items which the query matches in the description
field (which is boosted at 1) is scored higher than result for where the
query is matched in the authors field (which is boosted at 10).

this leaves me to believe that the index time boost isn't working correctly.
Have i omitted norms correctly?

the score for one result which is matched by the author field is nearly the
same as the score for one result which is matched by the description field
so doubtful the boost is kept and is normalized when in the copyfield.

Unfortunately i cannot switch to dismax parser at this late stage so cannot
do query time boosting unless theres another way of doing it on the standard
parser.

thanks
joe

-- 
View this message in context: http://lucene.472066.n3.nabble.com/Index-time-boosting-tp1411105p1411105.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Index time boosting

Posted by Erick Erickson <er...@gmail.com>.
No, I wasn't thinking of the _val_ hack, you can boos via the
q parameter as you indicated: i_authors:tilly^5 i_title:tilly^10

Do note, though, that you'll never be able to absolutely
guarantee the ordering you want, although by using "crazy values'
you may not be able to tell <G>...

Best
Erick

On Fri, Sep 3, 2010 at 10:08 AM, phoey <ph...@gmail.com> wrote:

>
> thanks for replying erick,
>
> We are currently using dismax but for this particular client we have
> coupled
> their implementation to standard parser and will be difficult to switch,
> although i might just have to bite the bullet for this.
>
> "which you can do without dismax BTW, although you have to interpret the
> user's input"
>
> This is doing it by the _val_: hack within the q param correct? Or do you
> mean by having the query (i_authors:tilly^5 i_title:tilly^10) etc?
>
>  How would i do it to say boost title by 5 - is that even possible within a
> function query?
>
> i will try just giving some crazy boost values to the most important fields
> and hope that it improves the problem.
>
> joe
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Index-time-boosting-tp1411105p1412259.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Index time boosting

Posted by phoey <ph...@gmail.com>.
thanks for replying erick, 

We are currently using dismax but for this particular client we have coupled
their implementation to standard parser and will be difficult to switch,
although i might just have to bite the bullet for this.

"which you can do without dismax BTW, although you have to interpret the
user's input"

This is doing it by the _val_: hack within the q param correct? Or do you
mean by having the query (i_authors:tilly^5 i_title:tilly^10) etc?

 How would i do it to say boost title by 5 - is that even possible within a
function query?

i will try just giving some crazy boost values to the most important fields
and hope that it improves the problem.

joe


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Index-time-boosting-tp1411105p1412259.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Index time boosting

Posted by Erick Erickson <er...@gmail.com>.
Have you tried running the queries through with &debugQuery=true?
It may well be that, for certain documents, the lower-boosted fields
are still overwhelming the contribution to scoring from the higher-boosted
fields for the documents in question.

The problem is that index-time boosting is fairly inflexible, as you're
finding out. You need to tweak the values to get satisfactory ranking,
there's no good way to determine these theoretically. At best, boosting
gives you "better" ranking. There's no guarantee at all that it'll give you
all documents that match in the title field before all documents that
match in the author field followed by all documents that match in the
description field. You can approximate this behavior by upping your boosts
(a lot, say 10000, 1000, 10) if that's truly your desire.

Why are you using index time boosting? It has a different intent than
query-time boosting (which you can do without dismax BTW, although
you have to interpret the user's input).

Are you sure you can't use dismax?

HTH
Erick

On Fri, Sep 3, 2010 at 5:34 AM, phoey <ph...@gmail.com> wrote:

>
> Hi there,
>
> Im having some issues with my relevancy of some results. I have 5 fields,
> with varying boost values and being copied into a copyfield "text" which is
> used to be searched on
>
>
> <field name="i_title" type="alphaOnlySort" indexed="true" stored="true"
> omitNorms="false"/>
> <field name="i_authors" type="text_ws" indexed="true" stored="true"
> omitNorms="false"/>
> <field name="i_subjects" type="text_ws" indexed="true" stored="true"
> omitNorms="false"/>
> <field name="i_features" type="text_ws" indexed="true" stored="true"
> omitNorms="false"/>
> <field name="i_description" type="text_ws" indexed="true" stored="true"
> omitNorms="false"/>
>
>
> <field name="text" type="text" indexed="true" stored="false"
> multiValued="true" />
> ...
> <copyField source="i_*" dest="text"/>
>
> im sending each of these fields with the boost values (i_title is 20,
> i_authors is 10 ... i_description is 1)
>
> now the issue is that some items which the query matches in the description
> field (which is boosted at 1) is scored higher than result for where the
> query is matched in the authors field (which is boosted at 10).
>
> this leaves me to believe that the index time boost isn't working
> correctly.
> Have i omitted norms correctly?
>
> the score for one result which is matched by the author field is nearly the
> same as the score for one result which is matched by the description field
> so doubtful the boost is kept and is normalized when in the copyfield.
>
> Unfortunately i cannot switch to dismax parser at this late stage so cannot
> do query time boosting unless theres another way of doing it on the
> standard
> parser.
>
> thanks
> joe
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Index-time-boosting-tp1411105p1411105.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>