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 ayyanar <ay...@aspiresys.com> on 2008/12/11 07:49:22 UTC

Nwebie Question on boosting

I read many articles on boosting still iam not so clear on boosting. Can
anyone explain the following questions with examples? 

1) Can you given an example for field level boosting and document level
boosting and the difference between two? 

2) If we set the boost at field level (index time), should the query
contains the that particular field? 
For example, if we set the boost for title field, should we create the
termquery for title field? 

Also, based on your experience, can you explain why you need the boosting. 

Thanks, 
Ayyanar. A
-- 
View this message in context: http://www.nabble.com/Nwebie-Question-on-boosting-tp20950286p20950286.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Nwebie Question on boosting

Posted by "Steffen B." <s....@fhtw-berlin.de>.
Hi,

ayyanar wrote:
> 
> Thanks Rob. Can you plz provide some sample documents (lucene) for title
> bassed boosting?
> 

I'm not sure about the Lucene part (this is the Solr mailing list after
all), but if you want index time boosting of certain fields, you have to add
documents like this:
<add>
  <doc>
    <field name="id">123</field>
    <field name="title" boost="2.0">My boosted field</field>
    <field name="text">Here goes the text, yadda yadda</field>
  </doc>
</add>

In this document the title-field will be boosted with a factor of 2, if it
has norms enabled. (omitNorms = false) You can read more about this here:
http://wiki.apache.org/solr/UpdateXmlMessages#head-63c170cad521de8d1e9be0d76025774cf3b66dfc
-- 
View this message in context: http://www.nabble.com/Nwebie-Question-on-boosting-tp20950286p20953736.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Nwebie Question on boosting

Posted by ayyanar <ay...@aspiresys.com>.

Thanks Rob. Can you plz provide some sample documents (lucene) for title
bassed boosting?
-- 
View this message in context: http://www.nabble.com/Nwebie-Question-on-boosting-tp20950286p20952532.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Nwebie Question on boosting

Posted by Robert Young <ro...@roryoung.co.uk>.
On Thu, Dec 11, 2008 at 6:49 AM, ayyanar
<ay...@aspiresys.com>wrote:

> 1) Can you given an example for field level boosting and document level
> boosting and the difference between two?

Field level boosting is used when one field is considered more or less
important than another. For example, you may want the title field of a
document to be considered more important so that if a term appears in the
title this considered more important than if it appears in the body. On the
other hand, document level boosting is about when a document is more or less
important than another. For example, an FAQ is often considered a very
important page and as such, may be required to appear higher in results than
it otherwise would have.

>
>
> 2) If we set the boost at field level (index time), should the query
> contains the that particular field?
> For example, if we set the boost for title field, should we create the
> termquery for title field?
>
> Yes, if you want that it to make any difference.


Rob