1.. _imap-admin-searchtiers:
2
3Search Tiers
4============
5
6The Xapian search engine supports searching from multiple databases at
7once, creating a tiered database structure.  To use Xapian, these tiers
8must be defined in :cyrusman:`imapd.conf(5)` with the
9`defaultsearchtier` and `searchpartition-name` settings.
10
11Default Search Tier Name
12------------------------
13
14Specify the name of the default search tier using the `defaultsearchtier`
15setting:
16
17.. include:: /imap/reference/manpages/configs/imapd.conf.rst
18        :start-after: startblob defaultsearchtier
19        :end-before: endblob defaultsearchtier
20
21Search Tier Partition Location
22------------------------------
23
24Each search tier to be used requires a partition location be specified
25via a `searchpartition-name` setting, wherein "name" is replaced
26with the name of the mail spool for which this search partition is to
27be used, and prepended by the name of the tier with which it is
28associated::
29
30    {tier}searchpartition-{spool}
31
32Again, building on our examples from :ref:`imap-admin-locations-spool`,
33here we have three spool partitions defined, so we need three search
34partitions for each tier.  In this example, with just a single tier, we
35will 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
58These 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
63