MailSuite Pro documentation

Setting up Solr to improve search performance

While performing IMAP search on just the headers is usually fast, running search in message text in standard setup of MailSuite Pro could use improvement. That's done by setting up and configuring an additional search module, we use Apache Solr for this purpose.

The configuration is performed as follows:

1. Download Solr 4:

wget ftp://ftp.task.gda.pl/pub/www/apache/dist/lucene/solr/4.10.4/solr-4.10.4.tgz

2. Extract the package into /opt/afterlogic/ directory.

3. Install Java:

yum install java-1.8.0-openjdk

4. Create and use schema file:

cp /opt/afterlogic/share/solr-schema.xml /opt/afterlogic/solr-4.10.4/example/solr/schema.xml
cd  /opt/afterlogic/solr-4.10.4/example
java -jar start.jar &

6. Add configuration options into plugin section of /opt/afterlogic/etc/dovecot.conf file:

plugin { 
.....
 fts = solr
 fts_solr = break-imap-search url=http://localhost:8983/solr/
 fts_decoder = decode2text
 fts_autoindex = yes
 fts_autoindex_max_recent = 100000
.....
}

7. Restart IMAP service:

/opt/afterlogic/etc/init.d/dovecot.rc restart