SearchIndexOptions Pennington.Search
Configuration for search index generation.
Properties
AreaPrioritiesDictionary<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). DefaultPriorityint- Default priority assigned to indexed documents. Default: 5.
FacetsSearchFacetField- Facet dimensions to generate for client-side filtering. Default:
Areaonly — 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). MaxEditDistanceint- 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.
PrefixPrioritiesDictionary<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). ShardPrefixLengthint- 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.
SynonymsDictionary<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; }
}