Configuration
See Dovecot FTS Configuration for configuration information regarding general FTS plugin options.
NOTE
Flatcurve REQUIRES the core Dovecot FTS stemming feature.
Required Configuration
The following is required to enable FTS Flatcurve in Dovecot configuration:
# Enable both "fts" and "fts_flatcurve" plugins
mail_plugins = $mail_plugins fts fts_flatcurve
plugin {
# Define "flatcurve" as the FTS driver.
fts = flatcurve
# These are not flatcurve settings, but required for Dovecot FTS. See
# Dovecot FTS Configuration link above for further information.
fts_languages = en es de
fts_tokenizers = generic email-address
# Maximum term length can be set via the 'maxlen' argument (maxlen is
# specified in bytes, not number of UTF-8 characters)
fts_tokenizer_email_address = maxlen=100
fts_tokenizer_generic = algorithm=simple maxlen=30
# OPTIONAL: Recommended default FTS core configuration
fts_filters = normalizer-icu snowball stopwords
fts_filters_en = lowercase snowball english-possessive stopwords
}
NFS Recommendation
To prevent concurrent writes to the Xapian database files, Dovecot relies on file locking.
If using NFS, the VOLATILEDIR
parameter for the mail_location
configuration option should be used to perform this locking locally as opposed to on the remote server.
Plugin Settings
The default parameters should be fine for most people.
These settings must go in a plugin {}
block. Example:
plugin {
fts_flatcurve_<setting> = <setting_value>
}
fts_flatcurve_commit_limit
- Default:
500
- Value: integer, set to
0
to use the Xapian default
Commit database changes after this many documents are updated. Higher commit limits will result in faster indexing for large transactions (i.e. indexing a large mailbox) at the expense of high memory usage. The default value should be sufficient to allow indexing in a 256 MB maximum size process.
fts_flatcurve_min_term_size
- Default:
2
- Value: integer
The minimum number of characters in a term to index.
fts_flatcurve_optimize_limit
- Default:
10
- Value: integer, set to
0
to disable
Once the database reaches this number of shards, automatically optimize the DB at shutdown.
fts_flatcurve_rotate_size
- Default:
5000
- Value: integer, set to
0
to disable rotation
When the "current" fts database reaches this number of messages, it is rotated to a read-only database and replaced by a new write DB. Most people should not change this setting.
fts_flatcurve_rotate_time
- Default:
5000
- Value: integer, set to
0
to disable rotation
When the "current" fts database exceeds this length of time (in msecs) to commit changes, it is rotated to a read-only database and replaced by a new write DB. Most people should not change this setting.
fts_flatcurve_substring_search
- Default:
no
- Value: boolean (
yes
orno
)
If enabled, allows substring searches (RFC 3501 compliant). However, this requires significant additional storage space. Most users today expect "Google-like" behavior, which is prefix searching, so substring searching is arguably not the "modern, expected" behavior. Therefore, even though it is not strictly RFC compliant, prefix (non-substring) searching is enabled by default.