lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Mark Nemeskey (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3174) Similarity.Stats class for term & collection statistics
Date Sat, 11 Jun 2011 17:38:58 GMT


David Mark Nemeskey commented on LUCENE-3174:

Ok, let's go with EasySimilarity then.

TODOs (according to the irc chat):
- move sumOfSquaredWeights() and normalize to Stats, so that Weight doesn't need to know about
- rename sumOfSquaredWeights()
- make BooleanWeight & friends independent of the normalization method? (currently BooleanWeight
expects the sqrt() in DefaultSimilarityProvider).

> Similarity.Stats class for term & collection statistics
> -------------------------------------------------------
>                 Key: LUCENE-3174
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Sub-task
>          Components: core/search
>    Affects Versions: flexscoring branch
>            Reporter: David Mark Nemeskey
>            Assignee: David Mark Nemeskey
>            Priority: Minor
>             Fix For: flexscoring branch
>         Attachments: LUCENE-3174.patch, LUCENE-3174.patch
> In order to support ranking methods besides TF-IDF, we need to make the statistics they
need available. These statistics could be computed in computeWeight (soon to become computeStats)
and stored in a separate object for easy access. Since this object will be used solely by
subclasses of Similarity, it should be implented as a static inner class, i.e. Similarity.Stats.
> There are two ways this could be implemented:
> - as a single Similarity.Stats class, reused by all ranking algorithms. In this case,
this class would have a member field for all statistics;
> - as a hierarchy of Stats classes, one for each ranking algorithm. Each subclass would
define only the statistics needed for the ranking algorithm.
> In the second case, the Stats class in DefaultSimilarity would have a single field, idf,
while the one in e.g. BM25Similarity would have idf and average field/document length.

This message is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message