class

Hwaro::Models::SearchConfig

Inherits Reference < Object

Constants

BUILTIN_FACETS = ["section", "lang", "tags"] of ::String

Facet names valid on every site; any taxonomy name is valid too. tags always is: front matter tags is parsed without a [[taxonomies]] entry.

RESERVED_FACETS = ["url", "title", "content", "description", "heading", "version"] of ::String

Record keys a taxonomy facet may not overwrite.

VALID_SHARDS = ["none", "section", "language", "section-language"] of ::String

shards partitions the index into search/<id>.json files plus a search/index.json manifest so clients lazy-load only what they need. single_file keeps the classic search.json alongside the shards; content_max_length (> 0) truncates each entry's content at a word boundary.

Constructors

Instance methods

content_max_length
Source
content_max_length=(content_max_length : Int32)
Source
enabled
Source
enabled=(enabled : Bool)
Source
exclude
Source
exclude=(exclude : Array(String))
Source
facets
Source
facets=(facets : Array(String))
Source
fields
Source
fields=(fields : Array(String))
Source
filename
Source
filename=(filename : String)
Source
format
Source
format=(format : String)
Source
sharded?
Source
shards
Source
shards=(shards : String)
Source
single_file
Source
single_file=(single_file : Bool)
Source
split_by_heading

split_by_heading adds one record per h2/h3 section (url#id); facets adds filterable fields to every record; ui publishes the built-in client under assets/hwaro-search/ (search_tags).

Source
split_by_heading=(split_by_heading : Bool)

split_by_heading adds one record per h2/h3 section (url#id); facets adds filterable fields to every record; ui publishes the built-in client under assets/hwaro-search/ (search_tags).

Source
tokenize_cjk
Source
tokenize_cjk=(tokenize_cjk : Bool)
Source
ui=(ui : Bool)
Source
ui_enabled?

The built-in UI ships only alongside an index it can fetch.

Source