Docs »

Records »

Types »

Search Index

Name (singular): Search Index
Name (plural): Search Indexes
Alias (uri): search_index
Identifier (ID): cerb.contexts.search.index

Usage tracking

Search Index worklists offer a 'Records' sparklines column charting indexed record count, with a 2h/1d/30d range toggle. A matching records: quick search filter queries the same data – for instance, records:(since:today).

Search indexes provide configurable, plugin-driven search on any record type. Each search index manages a linked custom filter, exposed as a filter: keyword on the record type's worklists.

A search index has:

  • A type (an extension that provides the indexing strategy – local full-text, vector embeddings, Elasticsearch, etc.)
  • A record type the index applies to
  • A filter query that constrains which records are included (e.g. "open tickets updated in the last year")
  • A content template that formats the indexable text per record (e.g. {{title}} {{content}}). Since it's a scripting template, it can also strip noise before indexing – strip_lines for quoted replies, strip_pem_blocks for keys and signatures, strip_data_uris for inline images, and strip_url_querystrings for tracking parameters – which keeps the index smaller and its matches more relevant. The built-in message index does exactly this.
  • A priority that controls autocompletion order; setting priority to 0 makes the index act as the default search filter when no explicit filter: is provided

The type and record type are set when the index is created and can't be changed afterward – the editor shows them as fixed values. Everything else stays editable.

The filter name and the filter query are separate things, and it's easy to conflate them. The filter name is the keyword you type (filter:header.from), and it's optional – leave it blank and the index has no keyword of its own. The filter query constrains which records get indexed at all, and leaving it blank indexes every record of that type.

New index types can be implemented via plugins.

Records API

These fields are available in the Records API and packages:

Req'd Field Type Notes
  created_at timestamp The date/time when this record was created
x extension_id text The ID of the search index extension (e.g. cerb.search.engine.fulltext)
  extension_params_json text Extension parameters serialized as JSON (e.g. content template, boosting weights)
  id number The ID of this search index
  links links An array of record type:id tuples to link to. Prefix with - to unlink.
x name text The name of this search index
  priority number Sort order in filter: autocompletion; 0 makes this the default filter when no filter: is specified
x record_filter text A search query that constrains which records are indexed
x record_type text The record type alias this index applies to
  updated_at timestamp The date/time when this record was last modified
x uri text A short identifier used as the filter: keyword (e.g. filter:by_title)

Dictionary Placeholders

These placeholders are available in dictionaries for automations, snippets, and API responses:

Field Type Description
_context text Record type extension ID
_label text Label
_type text Record type alias
created_at date Created
extension_id text Type
id number Id
name text Name
priority number Priority
record_filter text Filter query
record_type text Record type
record_url text Record URL
updated_at date Updated
uri text Filter URI

These optional placeholders are also available with key expansion in dictionaries and the API:

Field Type Description
comment_count number Comment count on the record
comments comments Comments
custom_<id> mixed Custom Fields
links links Links
watchers watchers Watchers

Search Query Fields

These filters are available in search index search queries:

Field Type Description
created: date Created
fieldset: record Fieldset
id: number Id
links: links Record Links
name: text Name
priority: number Priority
record_filter: text Filter query
record_type: text Record type alias
type: text Extension ID
updated: date Updated
uri: text Filter URI
watchers: record Watchers

Worklist Columns

These columns are available on search index worklists:

Column Description
cf_<id> Custom Field
r_created_at Created
r_extension_id Type
r_id Id
r_name Name
r_priority Priority
r_record_filter Filter query
r_record_type Record type
r_updated_at Updated
r_uri Filter URI