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

Services
SearchService
Routes
/<SEARCH_PATH>/<SEARCH_PATH>/results.json
Hooks filled
layout.nav
Translations
es

Commands

  • $ splent feature:search reindex [OPTIONS]

    Copy every searchable document into the index again.

  • $ splent feature:search status

    Say 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

Works better with
Used by

In product lines

Extension points

Templates
search/nav_box.htmlsearch/results.html
Services
SearchService
Routes
A refinement can add routes to its blueprint

Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.

Compatibility

Python
>=3.13
SPLENT framework
>=1.30.0