lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aneuryzma <>
Subject How to define custom numerical similarity scores in Lucene ?
Date Sat, 05 Mar 2011 08:17:55 GMT
Queries and Documents in my collection have multiple fields: some numeric and
some textual. I know how to define custom Similarity classes per field in
Lucene: so I have my textualSimilarity (tf.idf based) and a
numericalSimilarity class (both extending Similarity)

I'm now studying how to implement such numericalSimilarity. I have a math
formula " (queryNumber - docNumber) / normalization factor) to define the
similarity between numeric fields.

But how can I implement this formula in the numericalSimilarity class ?
Which methods should I extend ?


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

View raw message