| 1 |
.. _imap-admin-searchtiers: |
| 2 |
|
| 3 |
Search Tiers |
| 4 |
============ |
| 5 |
|
| 6 |
The Xapian search engine supports searching from multiple databases at |
| 7 |
once, creating a tiered database structure. To use Xapian, these tiers |
| 8 |
must be defined in :cyrusman:`imapd.conf(5)` with the |
| 9 |
`defaultsearchtier` and `searchpartition-name` settings. |
| 10 |
|
| 11 |
Default Search Tier Name |
| 12 |
------------------------ |
| 13 |
|
| 14 |
Specify the name of the default search tier using the `defaultsearchtier` |
| 15 |
setting: |
| 16 |
|
| 17 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 18 |
:start-after: startblob defaultsearchtier |
| 19 |
:end-before: endblob defaultsearchtier |
| 20 |
|
| 21 |
Search Tier Partition Location |
| 22 |
------------------------------ |
| 23 |
|
| 24 |
Each search tier to be used requires a partition location be specified |
| 25 |
via a `searchpartition-name` setting, wherein "name" is replaced |
| 26 |
with the name of the mail spool for which this search partition is to |
| 27 |
be used, and prepended by the name of the tier with which it is |
| 28 |
associated:: |
| 29 |
|
| 30 |
{tier}searchpartition-{spool} |
| 31 |
|
| 32 |
Again, building on our examples from :ref:`imap-admin-locations-spool`, |
| 33 |
here we have three spool partitions defined, so we need three search |
| 34 |
partitions for each tier. In this example, with just a single tier, we |
| 35 |
will be adding three search partitions. |
| 36 |
|
| 37 |
* Sample:: |
| 38 |
|
| 39 |
defaultpartition: main |
| 40 |
partition-main: /var/spool/cyrus |
| 41 |
partition-am: /var/spool/cyrus-am |
| 42 |
partition-nz: /var/spool/cyrus-nz |
| 43 |
partition-shared: /var/spool/cyrus-shared |
| 44 |
metapartition_files: header index cache expunge squat annotations |
| 45 |
metapartition-main: /var/spool/cyrusmeta/main |
| 46 |
metapartition-am: /var/spool/cyrusmeta/am |
| 47 |
metapartition-nz: /var/spool/cyrusmeta/nz |
| 48 |
metapartition-shared: /var/spool/cyrusmeta/shared |
| 49 |
search_engine: xapian |
| 50 |
search_index_headers: no |
| 51 |
search_batchsize: 8192 |
| 52 |
defaultsearchtier: temp |
| 53 |
tempsearchpartition-main: /var/spool/search/main |
| 54 |
tempsearchpartition-am: /var/spool/search/am |
| 55 |
tempsearchpartition-nz: /var/spool/search/nz |
| 56 |
tempsearchpartition-shared: /var/spool/search/shared |
| 57 |
|
| 58 |
These settings are in :cyrusman:`imapd.conf(5)`: |
| 59 |
|
| 60 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 61 |
:start-after: startblob searchpartition-name |
| 62 |
:end-before: endblob searchpartition-name |