lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luís Filipe Nassif <>
Subject Simple Similarity Implementation to Count the Number of Hits
Date Thu, 12 May 2016 02:19:39 GMT

In the past (lucene 4) I have tried to implement a simple Similarity to
only count the number of occurrences (term frequencies) into the documents,
ignoring norms, doc frequencies, boosts... It worked for some queries like
term and wildcard queries, but not for others, like phrase and range
queries. Phrase query scores were being squared, eg, a phrase query with 2
terms was returning score 4 and a phrase query with 3 terms was returning
score 9, for a document with only one occurrence of the phrase.

Does someone have a working example or guideline for that implementation?

Thank you,

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