lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sajid Khan <assamh...@yahoo.co.in>
Subject Re: Regarding adding one more factor in lucene scoring formula
Date Tue, 05 Dec 2006 10:23:49 GMT

Hi Grant
     Thanks for the instant reply.

Actually, there are two parts of the problem I'm trying to solve:

1) I want to show the results which contain the exact query phrase on 
top followed by results containing all the terms in the  query but the 
terms are not in the same sequence as the query.
This means the result will be ordered as 
   (exact match) followed by (results for ANDed query terms) 

2) When the query terms are scattered far from each other, I want to 
give such results a low ranking. This is the formula I'm using: 
         If the query is "A B C", I want to calculate the minimum 
distance in word count between 'A and B' say x, 'B and C' say y, 'C and A' 
say z. Then to calculate 
                      distanceWeight = (1/x) * (1/y) * (1/z), 

          Hence, this value will be calculated and incorporated into 
lucene's scoring formula for each of the results (or maybe only top 1000 
results) within the ANDed result set.

Thanks in advance for all your help.

regards
Sajid Khan






Grant Ingersoll-6 wrote:
> 
> http://lucene.apache.org/java/docs/scoring.html may be of some help,  
> plus the Javadocs and the code of course.
> 
> What is it you are trying to do?  Perhaps others have done similar  
> things.
> 
> -Grant
> 
> On Dec 4, 2006, at 7:24 AM, Sajid Khan wrote:
> 
>>
>> Hi all,
>>        I need to add one more factor(like tf, idf .....) in the lucene
>> scoring formula. But i am not getting any idea of where should i  
>> update the
>> code in Lucene.
>>       Can anybody  please help me to solve the problem?
>>
>> Ragards
>> Sajid Khan
>> -- 
>> View this message in context: http://www.nabble.com/Regarding- 
>> adding-one-more-factor-in-lucene-scoring-formula- 
>> tf2751348.html#a7675490
>> Sent from the Lucene - Java Developer mailing list archive at  
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
> 
> --------------------------
> Grant Ingersoll
> Center for Natural Language Processing
> http://www.cnlp.org
> 
> Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ 
> LuceneFAQ
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Regarding-adding-one-more-factor-in-lucene-scoring-formula-tf2751348.html#a7696791
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message