lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <dmit...@earthlink.net>
Subject Re: boosting
Date Thu, 18 Oct 2001 19:15:47 GMT
One idea I had but did not try yet is to create a special field in the 
doc and add optional clauses to queries that match for tokens in that 
field. The more matches are found the higher the document should score. 
Suppose you have some documents that should have a higher boost than 
others. Add a field to all documents called "boost" and for the 
documents that should have the boost set the value of the field to "x". 
I'm not sure how this would work with the query parser because I don't 
use it, but from the API if you were using a boolean query, you would 
then add then add a clause that matches "boost:x" as a not-required and 
not-prohibited (in other words an optional clause). The theory is that 
this would boost the score of the documents that have a match in this 
field, but will not exclude those that do not. It might even be possible 
to set the "boost" value to "x x" and "x x x" and so on to control the 
amount of boost a document will receive.

Can anyone veryfy that this actually works?


soshima@business.com wrote:

> Lucene has term query boosting for fields.  But does anyone know how 
> to do individual Document boosting?  So basically I want to put a 
> numerical value into a document and depending on its weight have it be 
> more/less revelant than other documents...Its basically mixing 
> revelancy search with numerical sorting.....Anyways I just want to 
> boost docs.  Thanks.
>
>  
>
> -scott
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message