Table of Contents

Public classStatic Bm25Scorer

Namespace
Rowles.LeanLucene.Search.Scoring
Assembly
Rowles.LeanLucene.dll

BM25 scorer. Computes relevance scores for term matches.

public static class Bm25Scorer
Bm25Scorer

Public method Idf(int, int)

Precomputes the IDF component (constant for a given term across all documents).

Public method PrecomputeFactors(int, int, float)

Precomputes factors that are constant for a given field/term. Returns (idf, k1BOverAvgDL) where k1BOverAvgDL = K1 * B / avgDocLength.

Public method Score(int, int, float, int, int)

Computes the BM25 score for a single term in a single document.

Public method ScorePrecomputed(float, float, int, int)

Scores with precomputed IDF and normalisation factor. Avoids per-doc division.