Search
Enable search on a collection and every string and text property becomes
searchable through the ?search= query parameter — no per-field configuration.
Enabling search
Turn search on for a collection in the Developer Portal (the Search toggle on the collection editor) or in the schema:
{
"name": "articles",
"search": { "enabled": true },
"properties": [
{ "name": "title", "type": "string" },
{ "name": "body", "type": "text" }
]
}
Enabling starts a background index build. The search.state in the collection
schema tells you where it is:
| State | Meaning |
|---|---|
indexPending | Index not created yet — ?search= returns 400 briefly |
indexing | Building — ?search= works but results are partial |
ready | Fully searchable |
error | Build failed (see statusMessage) — re-save to retry |
noSearchableProperties | Enabled, but the collection has no string/text fields yet |
Building takes seconds to minutes depending on how much data there is. While it
runs, responses carry an X-Search-Index-Status: indexing header.
Searching
GET /api/articles?search=blue widget
Words are matched as prefixes, and all words must match somewhere in the collection's searchable properties:
search=widmatches "widget" (prefix), butsearch=getdoes not match "widget" — this is prefix matching, not substring. Use theconfilter operator for substrings.search=blue widgetmatches records containing both "blue" and "widget", in any of the searchable fields.
Search is case- and accent-insensitive. Each word needs at least 2 characters, and a query accepts at most 8 words.
Combining with filter, sort and paging
search composes with everything else — it is ANDed with your filter:
GET /api/articles?search=widget&filter=published eq true&sortBy=title&pageSize=50
What it searches
Search covers the string and text properties of the collection (or, for a
view, only the properties the view exposes). It does not
search lookup display fields, included child collections, or object/JSON
properties.
Views
Views inherit search from their base collection — there is no separate toggle. A view searches only the properties it exposes, so a public view never leaks matches from hidden columns.
Consistency
The index updates within seconds of a write (it is eventually consistent). A record you just created may take a moment to appear in search results.
Limitations
- Search is not available on queries.
- Results are not ranked by relevance — use
sortByto order them. - Search is unavailable inside a transaction session (the index cannot see uncommitted changes).