JustFlows

Наразі документація лише англійською мовою. Решта сайту відповідає вашій мові.

Site search

Full-text search across published content: the core.search block, public /search pages, admin content search, and the headless search API.

6 хв читання

Public search lives at /search?q=… (and /<locale>/search?q=…), resolved through the same template hierarchy as everything else — a theme's templates/search.json if it ships one, otherwise index.json. Drop a Search block (core.search) anywhere to add a query box and results list; its inspector scopes the block to a content type, a taxonomy or term, date filters, which filters are shown to visitors, and results per page.

Admin search and the Tools panel

Admin → Content search and the menu/content pickers query the same shared, incremental full-text index — not a client-side filter — scoped by site, ownership, content type, and locale. Admin → Tools → Site search configures which content types are publicly searchable (publicTypes, default page, post, product) and whether anonymous queries are logged (queryLogging), and rebuilds the index on demand: GET/PUT /api/search/settings, POST /api/search/rebuild (all settings:manage).

Headless API

http
GET /api/v1/search?q=hello&type=post&locale=en&limit=20

Inherits the same public-API enablement, CORS, and anonymous rate limiting as the rest of /api/v1, plus its own cap of 60 requests per minute per IP. The session admin equivalent, GET /api/search, is limited to 120/min/IP; POST /api/search/rebuild to 2/min/IP.

Plugin search backends

A plugin can take over ranking and matching with the search.backend SDK filter instead of the built-in database index — implement upsert(document), remove(id, siteId), and search({ siteId, q, locale, limit }) behind content:read. Only one engine should be active per site; the host applies it in place of the default index.

Note

Search metrics are opt-in and anonymous: the stored row is a token count, result count, and duration against a site — never the query text, an IP address, or an account id. Migrations 0028_site_search and 0029_search_metrics.