SimilarityBase
A subclass of Similarity that provides a simplified API for its descendants. Subclasses are only required to implement the .score and .toString methods. Implementing .explain is optional, inasmuch as SimilarityBase already provides a basic explanation of the score and the term frequency. However, implementers of a subclass are encouraged to include as much detail about the scoring method as possible.
Note: multi-word queries such as phrase queries are scored in a different way than Lucene's default ranking algorithm: whereas it "fakes" an IDF value for the phrase as a whole (since it does not know it), this class instead scores phrases as a summation of the individual term scores.
Inheritors
Constructors
Properties
Functions
Computes the normalization value for a field at index-time.
Compute any collection-level weight (e.g. IDF, average document length, etc) needed for scoring a query.