Search
Configures full-text search indexing for emails, calendars, contacts, and tracing.
This object can be configured from the WebUI under Settings › Search
Fields
indexBatchSize
Type:
UnsignedInt· default:100· min: 1Number of items to process in each batch during indexing operations
defaultLanguage
Type:
Locale· default:"en_US"Default language to use when language detection is not possible
supportedLanguages
Type:
Locale[]· default:["en_US"]List of languages to enable for full-text search
indexCalendar
Type:
Boolean· default:trueEnable full-text search indexing for calendar data
indexCalendarFields
Type:
SearchCalendarField[]· default:["title","description","location","owner","attendee","start","uid"]List of calendar fields to index
indexContacts
Type:
Boolean· default:trueEnable full-text search indexing for contacts data
indexContactFields
Type:
SearchContactField[]· default:["member","kind","name","nickname","organization","email","phone","onlineService","address","note","uid"]List of contact fields to index
indexEmail
Type:
Boolean· default:trueEnable full-text search indexing for email content and metadata
indexEmailFields
Type:
SearchEmailField[]· default:["from","to","cc","bcc","subject","body","attachment","receivedAt","sentAt","size","hasAttachment"]List of email fields to index
indexTelemetry
Type:
Boolean· enterprise · default:trueEnable full-text search indexing for tracing data
indexTracingFields
Type:
SearchTracingField[]· enterprise · default:["eventType","queueId","keywords"]List of tracing fields to index
JMAP API
The Search singleton is available via the urn:stalwart:jmap capability.
x:Search/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysSearchGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Search/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:Search/set
This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysSearchUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Search/set",
{
"update": {
"singleton": {
"indexBatchSize": 100
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get search
Update
stalwart-cli update search --field description='Updated'
Enums
SearchCalendarField
| Value | Label |
|---|---|
title | Event Title |
description | Event Description |
location | Event Location |
owner | Event Owner |
attendee | Event Attendee |
start | Event Start Date |
uid | Event UID |
SearchContactField
| Value | Label |
|---|---|
member | Group Member |
kind | Contact Kind |
name | Contact Name |
nickname | Contact Nickname |
organization | Contact Organization |
email | Contact Email |
phone | Contact Phone |
onlineService | Contact Online Service |
address | Contact Address |
note | Contact Note |
uid | Contact UID |
SearchEmailField
| Value | Label |
|---|---|
from | From Address |
to | To Address |
cc | Cc Address |
bcc | Bcc Address |
subject | Subject |
body | Body Content |
attachment | Attachment Content |
receivedAt | Received Date |
sentAt | Sent Date |
size | Message Size |
hasAttachment | Has Attachment |
headers | Email Headers |
SearchTracingField
| Value | Label |
|---|---|
eventType | Event Type |
queueId | Queue ID |
keywords | Keywords |