
IndexSearcherConfig
- Namespace
- Rowles.LeanCorpus.Search.Searcher
- Assembly
- Rowles.LeanCorpus.dll
Configuration for the IndexSearcher.
public sealed class IndexSearcherConfig
CompatibilityMode
Compatibility guardrail applied when opening an index. Defaults to strict mode.
EnableQueryCache
Enable the query result cache. When true, repeat queries against the same commit generation return cached results. Default: false.
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 or low-latency single-segment workloads. Default: true.
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).