lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Diviacco <>
Subject How to define custom numerical similarity scores in Lucene ?
Date Fri, 04 Mar 2011 22:33:30 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 ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message