Section navigation

Public classSealed IndexSearcherConfig

Namespace
Rowles.LeanCorpus.Search.Searcher
Assembly
Rowles.LeanCorpus.dll

Configuration for the IndexSearcher.

public sealed class IndexSearcherConfig
Inheritance
IndexSearcherConfig

Public property CodecCatalog

Gets or sets the immutable codec catalogue used for compatibility inspection.

Public property CompatibilityMode

Compatibility guardrail applied when opening an index. Defaults to strict mode.

Public property EnableBlockMaxWand

Enable Block-Max WAND scoring for disjunctive (OR) queries. When true, the searcher uses per-block impact metadata to skip non-competitive blocks during top-K evaluation. Most effective for large OR queries against indexes with many documents per term. Default: false.

Public property EnableQueryCache

Enable the query result cache. When true, repeat queries against the same commit generation return cached results. Default: false.

Public property MaxCachedSegmentReaders

Maximum number of heavy segment-reader states retained by this searcher. Active states are protected from eviction. Default: 256.

Public property MaxConcurrency

Maximum degree of parallelism for multi-segment search. -1 means use Environment.ProcessorCount. Default: -1.

Public property Metrics

Metrics collector for search latency, cache hit/miss, etc. Default: NullMetricsCollector (no-op).

Public property ParallelSearch

Whether to use parallel segment search when multiple segments exist. Disable for deterministic ordering and low-latency small-segment workloads. Default: false.

Public property PerFieldSimilarities

Optional field-specific scoring models. Fields not present use Similarity.

Public property QueryCacheMaxEntries

Maximum number of entries in the query result cache. Default: 1024.

Public property SearchAnalytics

Optional per-search event analytics. When set, each search produces a SearchEvent in a bounded ring buffer. Default: null (disabled).

Public property Similarity

Scoring model. Default: BM25.

Public property SlowQueryLog

Optional slow query log. When set, queries exceeding the configured threshold are written as JSON lines to the log output. Default: null (disabled).