lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: Search Score percentage, Should not be relative to the highest score
Date Mon, 03 Jan 2011 12:50:37 GMT
> I had read the link and I understand the concern, however,
> the normalization
> is happening inside lucene. Where the normalizing value is
> the inverse of
> the maxScore.
> 
> I can alter the code to leave the original score, however
> it is a business
> requirements to view the matching percentage. Also, the
> absolute score means
> nothing because we wont know the exact matching score.

Can you re-phrase your requirement? What do you mean by exact match?

Query: term1 term2
Doc1: term1 term2
Doc2: term1 term2 term3 term4

Here both doc1 and doc2 are "exact match" or just Doc1?

If you want to capture the "how many query terms matched" information may be you can use http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/search/Explanation.html

Or you can modify similarity to ignore all things other than coord, so that your documents
are sorted by "how many of the query terms are found in the specified document" 
http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/search/Similarity.html#formula_coord
 



      

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


Mime
View raw message