lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john atsh <>
Subject Similarity
Date Sun, 22 Mar 2009 20:49:51 GMT

I want to change slightly the similarity function, in the following way:

Use same cosine similarity as defined by DefaultSimilarity, but multiply the
result score by f, where f is defined as following
f = (# of terms in query that appear also in document) / (# of terms in

(this boosts documents that contain RELATIVELY more query terms)

What's the best way to do it, and how?

View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message