lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kdev <>
Subject Scoring formula - Average number of terms in IDF
Date Tue, 10 Nov 2009 12:32:12 GMT


I want to change the default scoring formula of lucene and one of the
changes I want to perform is on the idf term. What I want to do is to
include the average number of terms of the documents indexed in the
collection in the idf method of the Similarity class.

In order to change the scoring formula I'm planning to implement a subclass
of DefaultSimilarity and use the new class by calling
IndexWriter.setSimilarity before indexing and Searcher.setSimilarity before
The fact that lucene requests the new class to be used while creating the
index makes me wonder if it is possible to have a scoring formula with an
idf term that includes the average number of terms of documents being
indexed(an average which will be available only when all the documents are

So is there a way to have access in the average number of document terms
inside the idf method of Similarity class??

thank you in advance
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message