
IndexSearcherConfig
- Namespace
- Rowles.LeanCorpus.Search.Searcher
- Assembly
- Rowles.LeanCorpus.dll
Configuration for the IndexSearcher.
public sealed class IndexSearcherConfig
- Inheritance
-
IndexSearcherConfig
CodecCatalog
Gets or sets the immutable codec catalogue used for compatibility inspection.
CompatibilityMode
Compatibility guardrail applied when opening an index. Defaults to strict mode.
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.
EnableQueryCache
Enable the query result cache. When true, repeat queries against the same commit generation return cached results. Default: false.
MaxCachedSegmentReaders
Maximum number of heavy segment-reader states retained by this searcher. Active states are protected from eviction. Default: 256.
MaxConcurrency
Maximum degree of parallelism for multi-segment search. -1 means use Environment.ProcessorCount. Default: -1.
Metrics
Metrics collector for search latency, cache hit/miss, etc. Default: NullMetricsCollector (no-op).
ParallelSearch
Whether to use parallel segment search when multiple segments exist. Disable for deterministic ordering and low-latency small-segment workloads. Default: false.
PerFieldSimilarities
Optional field-specific scoring models. Fields not present use Similarity.
QueryCacheMaxEntries
Maximum number of entries in the query result cache. Default: 1024.
SearchAnalytics
Optional per-search event analytics. When set, each search produces a SearchEvent in a bounded ring buffer. Default: null (disabled).
Similarity
Scoring model. Default: BM25.
SlowQueryLog
Optional slow query log. When set, queries exceeding the configured threshold are written as JSON lines to the log output. Default: null (disabled).