This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

SearchIndexOptions Pennington.Search

Configuration for search index generation.

Properties

AreaPriorities Dictionary<string, int>
Per-area search priority (area slug to priority); higher ranks first. Documents whose area is absent from the map use DefaultPriority. The DocSite derives this from its configured area order so results lean toward earlier areas (e.g. tutorials/how-to over reference) when matches are otherwise comparable. Default: empty (uniform priority).
DefaultPriority int
Default priority assigned to indexed documents. Default: 5.
Facets SearchFacetField
Facet dimensions to generate for client-side filtering. Default: Area only — content areas are few and stable, so they make clean filter chips. Section and tag faceting are opt-in because their vocabularies are large enough to bury the filter bar in chips; combine the flags to re-enable (e.g. Area | Section | Tags).
MaxEditDistance int
Upper bound on the edit distance the client applies for typo-tolerant matching. The client also scales the budget down for short terms; this caps it. Set to 0 to require exact matches. Default: 2.
PrefixPriorities Dictionary<string, int>
Per-route-prefix search priority (URL prefix to priority), checked before AreaPriorities; the longest matching prefix wins and its value replaces the area value rather than stacking. Drops a whole URL territory below comparable prose that keeps its area lean — generated API reference, for example, registers its route prefix here so its pages don't bury conceptual articles. Default: empty (area/default apply).
ShardPrefixLength int
Number of leading characters of a stemmed term used as its shard key. Lower values produce fewer, larger shards; higher values produce more, smaller shards. Default: 2.
Synonyms Dictionary<string, string[]>
Query-time synonyms. Each entry maps a term to the additional terms it should also match. Keys and values are stemmed at build time and shipped in the index entrypoint, so authors write natural words (e.g. "config" => ["configuration"]). Default: empty.

Pennington.Search.SearchIndexOptions

namespace Pennington.Search;

/// Configuration for search index generation.
public class SearchIndexOptions
{
    /// Per-area search priority (area slug to priority); higher ranks first. Documents whose area is absent from the map use DefaultPriority. The DocSite derives this from its configured area order so results lean toward earlier areas (e.g. tutorials/how-to over reference) when matches are otherwise comparable. Default: empty (uniform priority).
    
public Dictionary<string, int> AreaPriorities { get; set; }
/// Default priority assigned to indexed documents. Default: 5.
public int DefaultPriority { get; set; }
/// Facet dimensions to generate for client-side filtering. Default: Area only — content areas are few and stable, so they make clean filter chips. Section and tag faceting are opt-in because their vocabularies are large enough to bury the filter bar in chips; combine the flags to re-enable (e.g. Area | Section | Tags).
public SearchFacetField Facets { get; set; }
/// Upper bound on the edit distance the client applies for typo-tolerant matching. The client also scales the budget down for short terms; this caps it. Set to 0 to require exact matches. Default: 2.
public int MaxEditDistance { get; set; }
/// Per-route-prefix search priority (URL prefix to priority), checked before AreaPriorities; the longest matching prefix wins and its value replaces the area value rather than stacking. Drops a whole URL territory below comparable prose that keeps its area lean — generated API reference, for example, registers its route prefix here so its pages don't bury conceptual articles. Default: empty (area/default apply).
public Dictionary<string, int> PrefixPriorities { get; set; }
/// Number of leading characters of a stemmed term used as its shard key. Lower values produce fewer, larger shards; higher values produce more, smaller shards. Default: 2.
public int ShardPrefixLength { get; set; }
/// Query-time synonyms. Each entry maps a term to the additional terms it should also match. Keys and values are stemmed at build time and shipped in the index entrypoint, so authors write natural words (e.g. "config" => ["configuration"]). Default: empty.
public Dictionary<string, string[]> Synonyms { get; set; }
}