Hi,
I am relatively new to Apache Solr and I am trying to get it to integrate
with Dovecot 2.2 running on Ubuntu 14.04 and needed a little help with
configuration.
The following steps I have already configured. Appreciate if someone could
help, so please help me!
1. Apache Solr installed, up and running
6406 [main] INFO org.eclipse.jetty.server.AbstractConnector ?
Started SocketConnector at 0.0.0.0:8983
I can then ssh into it and see the running solr admin.
ssh -t -L 8983:localhost:8983 user at mydomain.com
2. Schema file added
startTime:
3 minutes ago
instanceDir:
/opt/solr/solr/collection1/
dataDir:
/opt/solr/solr/collection1/data/
In my collection1 core selector I have the following files:-
1.solrconfig.xml
2.schema.xml
The output of schema.xml is shown below:-
<?xml version="1.0" encoding="UTF-8" ?>
<!--
For fts-solr:
Tested with dovecot 2 and Solr 4.10
This is the Solr schema file, place it into solr/conf/schema.xml.
by Adrian Jon kriel
-->
<schema name="dovecot" version="1.5">
<field name="_version_" type="long"
indexed="true" stored="true"/>
<field name="_root_" type="string"
indexed="true" stored="false"/>
<types>
<!-- IMAP has 32bit unsigned ints but java ints are signed, so use longs
-->
<fieldType name="string" class="solr.StrField"
omitNorms="true"/>
<fieldType name="long" class="solr.LongField"
omitNorms="true"/>
<fieldType name="slong"
class="solr.SortableLongField" omitNorms="true"/>
<fieldType name="float" class="solr.FloatField"
omitNorms="true"/>
<fieldType name="boolean" class="solr.BoolField"
omitNorms="true"/>
<fieldType name="text" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1"
catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<!-- DEPRECATED VALUE
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
-->
<filter class="solr.SnowballPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.NGramFilterFactory"
minGramSize="3"
maxGramSize="15"/>
<filter
class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true"
expand="true"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1"
catenateWords="0"
catenateNumbers="0" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<!-- DEPRECATED VALUE
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
-->
<filter class="solr.SnowballPorterFilterFactory"
protected="protwords.txt"/>
<filter
class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
</types>
<fields>
<field name="id" type="string"
indexed="true" stored="true"
required="true" />
<field name="uid" type="slong"
indexed="true" stored="true"
required="true" />
<field name="box" type="string"
indexed="true" stored="true"
required="true" />
<field name="user" type="string"
indexed="true" stored="true"
required="true" />
<field name="hdr" type="text" indexed="true"
stored="false" />
<field name="body" type="text"
indexed="true" stored="false" />
<field name="from" type="text"
indexed="true" stored="false" />
<field name="to" type="text" indexed="true"
stored="false" />
<field name="cc" type="text" indexed="true"
stored="false" />
<field name="bcc" type="text" indexed="true"
stored="false" />
<field name="subject" type="text"
indexed="true" stored="false" />
</fields>
<uniqueKey>id</uniqueKey>
<defaultSearchField>body</defaultSearchField>
<solrQueryParser defaultOperator="AND" />
</schema>
3. Dovecot package dovecot-solr installed
4. Dovecot configured with following files to run on solr-fts.
In 10-mail.conf:-
# Space separated list of plugins to load for all services. Plugins specific to
# IMAP, LDA, etc. are added to this list in their own .conf files.
#mail_plugins mail_plugins = fts fts_solr
In 90-plugin.conf:-
plugin {
fts = solr
fts_solr = break-imap-search url=http://localhost:8983/solr/
}
I would really appreciate if someone could please help me here.
Request for someone to guide me here.
Thanks a lot
Kevin