Semantic search finds resources by meaning. A visitor's query is embedded and compared with the indexed chunks, so "old farm buildings" can match a record described as "agricultural outbuildings, c. 1900" even with no words in common. No language model is involved and no answer is written; the results are the resources themselves.
Semantic search uses the same index as the chatbot, so anything covered in Indexing Content applies here too.
Adding a search block
- Edit a site page, click Add new block and choose Semantic Search.
- Fill in the fields:
| Field | Default | Description |
|---|---|---|
| Heading | Search | Heading above the search form. Leave empty for none. |
| Placeholder text | Search the collection... | Placeholder inside the search box. |
| Results per page | 10 | 1 to 50. |
| Restrict to item sets (optional) | none | Only items in at least one of the selected sets, and the media of those items, are returned. Blog posts and site pages have no item sets and are excluded while a restriction is set. Items indexed before version 1.5.0 need a re-index before they match; see Chat Widget and Block. |
- Save the page.
Adding a search page to the navigation
- Open the site's Navigation settings.
- Under Add a link, choose Semantic Search, set a Label (default "Search") and drag it into the navigation tree.
- Save.
The link goes to /s/{site-slug}/search, a full-page search showing 10 results per page. The page heading is the label you gave the link. The route exists whether or not a link is added, so a theme can link to it directly.
Using search
Type a query of up to 500 characters and press Enter or click Search. The query and page number are written to the URL (?q=...&page=2), so results can be bookmarked and shared, and the browser back button restores earlier results.
Each result shows:
- the resource title, linked to it on the current site,
- a badge reading Item or Media (blog posts and site pages currently show as Item),
- a relevance percentage derived from the cosine distance,
- a snippet of the best-matching chunk with the query words highlighted.
Results are grouped by destination URL, so an item and its media appear once and the best-scoring chunk wins. Paging buttons appear when there is more than one page.
How results are ranked
The endpoint fetches more chunks than one page needs (five times the page size, or eight times when scoped to a site, capped at 100 and 150), drops chunks from other sites, groups them by resource URL, sorts by distance and returns the requested page. The total shown is the number of distinct resources among the fetched chunks, not the size of the whole collection.