Skip to main content
Version: 0.16

SearchStore

Configures the full-text search backend.

This object can be configured from the WebUI under Settings › Storage › Search Store

Fields

SearchStore is a multi-variant object: each instance has an @type discriminator selecting one of the variants below, and each variant carries its own set of fields.

@type: "Default"

Use data store

@type: "ElasticSearch"

ElasticSearch

url

Type: Uri · required

URL of the ElasticSearch server

numReplicas

Type: UnsignedInt · default: 0 · max: 2048

Number of replicas for the index

numShards

Type: UnsignedInt · default: 3 · max: 1048576 · min: 1

Number of shards for the index

includeSource

Type: Boolean · default: false

Whether to index the full source document

timeout

Type: Duration · default: "30s"

Timeout for HTTP requests

allowInvalidCerts

Type: Boolean · default: false

Whether to allow invalid SSL certificates

httpAuth

Type: HttpAuth · required

The type of HTTP authentication to use

httpHeaders

Type: Map<String, String>

Additional headers to include in HTTP requests

@type: "Meilisearch"

MeiliSearch

url

Type: Uri · required

URL of the store

pollInterval

Type: Duration · default: "500ms"

Interval between polling for task status

maxRetries

Type: UnsignedInt · default: 120 · max: 1024 · min: 1

Number of times to poll for task status before giving up

failOnTimeout

Type: Boolean · default: true

Whether to fail the operation if the task does not complete within the polling retries

timeout

Type: Duration · default: "30s"

Timeout for HTTP requests

allowInvalidCerts

Type: Boolean · default: false

Whether to allow invalid SSL certificates

httpAuth

Type: HttpAuth · required

The type of HTTP authentication to use

httpHeaders

Type: Map<String, String>

Additional headers to include in HTTP requests

@type: "FoundationDb"

FoundationDB

clusterFile

Type: String?

Path to the cluster file for the FoundationDB cluster

datacenterId

Type: String?

Data center ID (optional)

machineId

Type: String?

Machine ID in the FoundationDB cluster (optional)

transactionRetryDelay

Type: Duration?

Transaction maximum retry delay

transactionRetryLimit

Type: UnsignedInt? · max: 1000 · min: 1

Transaction retry limit

transactionTimeout

Type: Duration?

Transaction timeout

@type: "PostgreSql"

PostgreSQL

timeout

Type: Duration? · default: "15s"

Connection timeout to the database

useTls

Type: Boolean · default: false

Use TLS to connect to the store

allowInvalidCerts

Type: Boolean · default: false

Allow invalid TLS certificates when connecting to the store

poolMaxConnections

Type: UnsignedInt? · default: 10 · max: 8192 · min: 1

Maximum number of connections to the store

poolRecyclingMethod

Type: PostgreSqlRecyclingMethod · default: "fast"

Method to use when recycling connections in the pool

readReplicas

Type: PostgreSqlSettings[] · enterprise

List of read replicas for the store

host

Type: HostName · required

Hostname of the database server

port

Type: UnsignedInt · default: 5432 · max: 65535 · min: 1

Port of the database server

database

Type: String · default: "stalwart"

Name of the database

authUsername

Type: String? · default: "stalwart"

Username to connect to the store

authSecret

Type: SecretKeyOptional · required

Password to connect to the store

options

Type: String?

Additional connection options

@type: "MySql"

mySQL

timeout

Type: Duration? · default: "15s"

Connection timeout to the database

useTls

Type: Boolean · default: false

Use TLS to connect to the store

allowInvalidCerts

Type: Boolean · default: false

Allow invalid TLS certificates when connecting to the store

maxAllowedPacket

Type: UnsignedInt? · max: 1073741824 · min: 1024

Maximum size of a packet in bytes

poolMaxConnections

Type: UnsignedInt? · default: 10 · max: 8192 · min: 1

Maximum number of connections to the store

poolMinConnections

Type: UnsignedInt? · default: 5 · max: 8192 · min: 1

Minimum number of connections to the store

readReplicas

Type: MySqlSettings[] · enterprise

List of read replicas for the store

host

Type: HostName · required

Hostname of the database server

port

Type: UnsignedInt · default: 3306 · max: 65535 · min: 1

Port of the database server

database

Type: String · default: "stalwart"

Name of the database

authUsername

Type: String? · default: "stalwart"

Username to connect to the store

authSecret

Type: SecretKeyOptional · required

Password to connect to the store

JMAP API

The SearchStore singleton is available via the urn:stalwart:jmap capability.

x:SearchStore/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 sysSearchStoreGet permission.

curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:SearchStore/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

x:SearchStore/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 sysSearchStoreUpdate permission.

curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:SearchStore/set",
{
"update": {
"singleton": {
"id": "id1"
}
}
},
"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-store

Update

stalwart-cli update search-store --field description='Updated'

Nested types

HttpAuth

Defines the HTTP authentication method to use for HTTP requests.

  • Unauthenticated: Anonymous. No additional fields.
  • Basic: Basic Authentication. Carries the fields of HttpAuthBasic.
  • Bearer: Bearer Token. Carries the fields of HttpAuthBearer.

HttpAuthBasic

HTTP Basic authentication credentials.

username

Type: String · required

Username for HTTP Basic Authentication

secret

Type: SecretKey · required

Password for HTTP Basic Authentication

SecretKey

A secret value provided directly, from an environment variable, or from a file.

SecretKeyValue

A secret value provided directly.

secret

Type: String · required · secret

Password or secret value

SecretKeyEnvironmentVariable

A secret value read from an environment variable.

variableName

Type: String · required

Environment variable name to read the secret from

SecretKeyFile

A secret value read from a file.

filePath

Type: String · required

File path to read the secret from

HttpAuthBearer

HTTP Bearer token authentication.

bearerToken

Type: SecretKey · required

Bearer token for HTTP Bearer Authentication

PostgreSqlSettings

PostgreSQL connection settings.

host

Type: HostName · required

Hostname of the database server

port

Type: UnsignedInt · default: 5432 · max: 65535 · min: 1

Port of the database server

database

Type: String · default: "stalwart"

Name of the database

authUsername

Type: String? · default: "stalwart"

Username to connect to the store

authSecret

Type: SecretKeyOptional · required

Password to connect to the store

options

Type: String?

Additional connection options

SecretKeyOptional

An optional secret value, or none.

  • None: No secret. No additional fields.
  • Value: Secret value. Carries the fields of SecretKeyValue.
  • EnvironmentVariable: Secret read from environment variable. Carries the fields of SecretKeyEnvironmentVariable.
  • File: Secret read from file. Carries the fields of SecretKeyFile.

MySqlSettings

MySQL connection settings.

host

Type: HostName · required

Hostname of the database server

port

Type: UnsignedInt · default: 3306 · max: 65535 · min: 1

Port of the database server

database

Type: String · default: "stalwart"

Name of the database

authUsername

Type: String? · default: "stalwart"

Username to connect to the store

authSecret

Type: SecretKeyOptional · required

Password to connect to the store

Enums

PostgreSqlRecyclingMethod

ValueLabel
fastFast recycling method
verifiedVerified recycling method
cleanClean recycling method