Table of Contents

Public namespace Rowles.LeanLucene.Search.Scoring

Classes

Internal classInternal BlockMaxWandScorer

Block-Max WAND (Weak AND) scorer for top-K query evaluation. Uses per-block impact metadata (maxFreq, maxNorm) stored in skip data to skip entire 128-doc blocks whose maximum possible score contribution falls below the current threshold θ (score of the Kth-best doc seen so far).

Internal classInternal BlockMaxWandScorer.TermScorer

Represents a single term's postings along with its precomputed block-max scores.

Internal classInternal BlockMaxWandScorer.TopNCollector

Simple min-heap-based top-N collector.

Public class Bm25Scorer

BM25 scorer. Computes relevance scores for term matches.

Public class Bm25Similarity

BM25 scoring (default). Delegates to Bm25Scorer.

Public class CollapseField

Configuration for result collapsing (field grouping). Keeps only the best document per unique value of the collapse field.

Public class CountCollector

A simple count-only collector that tracks hit count without storing results. Useful for count queries where actual documents are not needed.

Public class Explanation

A breakdown of how a document's score was computed, useful for debugging relevance tuning and understanding BM25 behaviour.

Public class FacetResult

The facet result for one field: the field name and its value-count buckets.

Public class FacetsCollector

Collects per-field value counts across a result set for faceted navigation.

Public class IndexStats

Immutable corpus-wide statistics computed once at IndexSearcher construction. Shared across all segment readers so BM25 scores are comparable across segment boundaries.

Internal classInternal SegmentStats
Public class SortField

Specifies a field and direction for sorting search results.

Public class TfIdfSimilarity

Classic TF-IDF scoring model.

Public class TopDocs

Encapsulates the results of a search query.

Public class TopNCollectorWrapper

Wraps a TopNCollector struct as an ICollector for use in extensible search pipelines.

Structs

Public struct FacetBucket

A single facet bucket: a field value and how many matching documents have it.

Public struct ScoreDoc

Represents a scored document in search results.

Public struct TopNCollector

Bounded min-heap collector that keeps the top-N highest-scoring documents. Single allocation: the ScoreDoc[topN] backing array.

Interfaces

Public interface ICollector

Abstraction for collecting search results. Implementations can count, aggregate, or collect in custom ways beyond the default TopN scoring.

Public interface ISimilarity

Pluggable scoring model. Allows replacing BM25 with alternative similarity functions.

Enums

Public enum CollapseMode

How to select the representative document per group.

Public enum SortFieldType

Specifies the data type and sort behaviour for a field-based sort criterion.