About
Product-wide search over whatever the installed features declare searchable, with the owning feature deciding at request time who may see each hit, and a faceted browse of the public sources (words as they are typed, facets with their counts, orders, pages) answered from Elasticsearch when the product has it and from the sources' documents in memory when it does not
Provides
SearchService
/<SEARCH_PATH>/<SEARCH_PATH>/results.json
layout.nav
es
Commands
-
$
splent feature:search reindex [OPTIONS]Copy every searchable document into the index again.
-
$
splent feature:search statusSay whether search works right now, and how much of it is built.
Run them in your workspace once the feature is installed in the selected product.
Configuration
| Setting | Default | What it does |
|---|---|---|
SEARCH_PATH |
search
|
The word the search is served under. |
SEARCH_LIMIT |
20
|
Candidates taken from each source, per source rather than in total, so a product with six searchable features does not spend its whole budget on whichever one sorts first. |
SEARCH_MIN_CHARS |
2
|
How short a term may be before it stops being a question. |
SEARCH_NAV |
true
|
Whether the header carries a search box. |
SEARCH_PLACEHOLDER |
empty | What the empty box invites a reader to do. Empty means the feature's own translated default; a product with more than one language writes a variant per language, "es:Buscar aquí|en:Search here". |
SEARCH_PAGE |
true
|
Whether the feature serves its own page and box. A hub whose explore draws the search takes this feature as its engine only. |
These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production.
Dependencies
In product lines
- openhubs_spl Optional in this line
-
openwiki_spl
Optional in this line
Needs
elasticsearch
Extension points
search/nav_box.htmlsearch/results.html
SearchService
Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.
Compatibility
>=3.13
>=1.30.0