| 1 |
Using Squatter for Faster IMAP SEARCH |
| 2 |
===================================== |
| 3 |
|
| 4 |
IMAP SEARCH, as described in :rfc:`3501`, is a IMAP4 (Rev1) command issued by |
| 5 |
the client, but executed on the server. The Cyrus IMAP server will search the |
| 6 |
mailbox for the content matching the search command issued. This may be an |
| 7 |
intensive operation if executed on large mailboxes, and may therefor delay the |
| 8 |
response to the client. |
| 9 |
|
| 10 |
To significantly speed up the searching, Cyrus IMAP can create a cache of |
| 11 |
message contents and meta-data using cyrus-squatter(8). This chapter explains |
| 12 |
how to generate and maintain these caches. |
| 13 |
|
| 14 |
Squatter Invocation |
| 15 |
------------------- |
| 16 |
|
| 17 |
Consider the following implications of running cyrus-squatter; |
| 18 |
|
| 19 |
* Squatter creates the search index from all messages in the mailbox |
| 20 |
|
| 21 |
.. todo:: list not complete |
| 22 |
|
| 23 |
|
| 24 |
Generating the Search Indexes |
| 25 |
----------------------------- |
| 26 |
|
| 27 |
To generate the search index for all mailboxes, issue the following command:: |
| 28 |
|
| 29 |
$ squatter -v |
| 30 |
|
| 31 |
While the Cyrus IMAP server now has the search index available for the mailbox |
| 32 |
contents, it does not automatically update the search index with new messages |
| 33 |
coming in. |
| 34 |
|
| 35 |
.. todo:: So how does the search index get updated? Do you run squatter on a |
| 36 |
daily basis from the EVENTS section of /etc/cyrus.conf |