lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Melissa Mifsud" <>
Subject Document Scoring
Date Thu, 04 Apr 2002 18:13:19 GMT

I've been going through Lucene's code for days now and I'm puzzled as to how the scoring works.

The scoring is ultimately performed by the Scorer which in turn uses the Similarity class.

The Similiarity class needs the docFreq(Term t) amd maxDoc() methods.

It calls these methods through the Searcher which is passed [Similarity.idf(Term t, Searcher

Now, the class IndexSearcher, which extends Searcher, refers back to  the IndexReader. Here
is the puzzling part:

    The method docFreq(Term t) and the method maxDoc() are both declared abstract in IndexReader.

Faced with this question, I was obliged to check out how it was done in the demo that comes
with Lucene. But the demo still uses IndexSearcher which in turn uses IndexReader to call
these methods.

Can anyone please shed some light here?


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