Search your content without running a search server
Every collection is searchable from a template with one call: AND, OR, quoted phrases and property-specific terms, ranked by the properties you say matter most.
Search runs against a collection's index, so there is nothing to install and no search server to keep alive. One template call, cms.collection.search(), returns the matching objects in the same shape as any other collection loop.
What it searches and how
- What you index. Every property in the schema's
indexis searchable, with the attributes stored with it: index an image and its alt text and EXIF data are searched too. - Words are an implicit AND. Searches are case-insensitive, and
brazil coffeefinds objects containing both words, even when they sit in different properties. - Phrases, OR and one property. Quotes make a phrase,
orwidens the match, andtitle:brazilrestricts a term to one property. These combine, with one limit: a query that mixesandwithoris treated as all OR.
Ranking
- By property order. Pass an ordered list of properties and a match in the first outranks a match in the second, so a hit in the title beats one in the summary. That ordering costs some processing, so keep the list short on a large collection.
- Closest match for long queries. Under strict AND, a long, descriptive query missing one word returns nothing.
cms.collection.searchScored()keeps anything that matches at least one term and orders results by how many terms each matched, with optional per-property weights. - The same for agents. The MCP search tools rank that way, which is why an agent asking a wordy question gets the closest match, not an empty list.
Where it stops
- One collection per call. No site-wide front-end search page comes out of the box.
- Exact words, a few thousand objects. The built-in search has no typo tolerance or synonyms, and it scans the index on every query, which is comfortable up to a few thousand objects per collection.
- Then Algolia. Past that, or when relevance matters more than simplicity, the bundled Algolia Search extension (Pro) sends the MCP search tools through a hosted Algolia index, with typo tolerance and synonyms, and falls back to the built-in search if Algolia is unreachable. Search in your templates keeps the built-in engine.
In practice
What it looks like in a template
{# Query syntax: a phrase, or, and a title-only term. Title hits rank first. #}
{% set query = '"cold brew" or title:espresso' %}
{% set results = cms.collection.search('blog', query, ['title', 'summary', 'tags']) %}
{# Relevance search: partial matches allowed, best coverage first #}
{% set results = cms.collection.searchScored('products', 'animated hamburger menu', {'name': 3, 'tags': 2}) %}
{% for item in results %}
<a href="{{ cms.collection.objectUrl('products', item) }}">{{ item.name }}</a>
{% endfor %}
search() applies the AND/OR syntax and ranks by property order; searchScored() returns the closest matches for a longer, descriptive query.
At a glance
What you get
- A real query syntax
- Case-insensitive, with implicit AND, explicit or, quoted phrases and property-specific terms such as title:brazil. Visitors can combine them in one query.
- Searches what you index
- Any property in the schema's index is searchable, along with its attributes. Index an image and its alt text and EXIF data are searched too.
- You set the ranking
- Pass an ordered list of properties and a match in the first outranks a match in the second. A hit in the title beats a hit in the summary.
- Closest match, not no match
- searchScored() keeps partial matches and ranks them by how many query terms each matched, with optional per-property weights.
- Algolia when you outgrow it
- The bundled Algolia Search extension, a Pro feature, routes the MCP search tools through a hosted index and falls back to the built-in search if it is unavailable.
Search
Common questions
Does Total CMS have site-wide search?
Not as a single call on the front end. A template search covers one collection at a time, so a site-wide results page means running the search for each collection you want included and listing the groups. AI agents are the exception: the MCP server has a tool that searches across collections.
Which fields are searched?
Only properties listed in the schema's index. If a field is not in the index it is not searchable, so add the properties visitors will search on, such as title, summary and tags.
Does search handle typos?
The built-in search does not: it matches the words as typed, case-insensitively. For typo tolerance, prefix matching and synonyms, the bundled Algolia Search extension (Pro) can take over the MCP search tools.
How large a collection can it search?
The built-in search reads the collection's index on each query, which is fine up to a few thousand objects per collection. Beyond that, test your own data, keep the list of priority properties short, or move to Algolia.
Try it on a site of your own.
45 days, every Pro feature, no credit card. Build it, hand it to a client, and see what they can and can’t touch.