I think this will work because in number 1 europe is the only word in the title 
which means it has a higher weight than the word Europe in number 2. In number 
2 there are more words around Europe and so on with number 3.
As I can remember the scoring algorithm should exactly reproduce this result if 
the body isn't regarded at. But in the body the words are usually weighed lower 
because it contains more words. 

Hope this helps!
stefan

-----Ursprüngliche Nachricht-----
Von: Eric Jain [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 10. Januar 2006 07:32
An: java-user@lucene.apache.org
Betreff: Re: Scoring by number of terms in field

Paul Elschot wrote:
>>For example, a query for "europe" should rank:
>>
>>1. title:"Europe"
>>2. title:"History of Europe"
>>3. title:"Travel in Europe, Middle East and Africa"
>>4. subtitle:"Fairy Tales from Europe"
> 
> Perhaps with this query (assuming the default implicit OR):
> 
> title:europe subtitle:europe^0.5 body:europe

This will ensure that match 4 appears at the end, but as far as I can see 
this won't help with getting matches 1-3 ordered correctly? Note that match 
1 for example may have a "description" field that contains a lot terms, but 
no mention of the query term.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to