Hi Daniel,
THere is no need of all this, just the command (on Solr 7.5) "create -c dovecot " is enough
The chema.xml provided on the wiki basically does not work on 7.5
Here the latest one I am working on , but nothing works properly (bad search results, errors in ftp_solr, etc..)
<?xml version="1.0" encoding="UTF-8"?>
<schema name="dovecot" version="2.0">
<uniqueKey>id</uniqueKey>
<types>
<fieldType name="string" class="solr.StrField" />
<fieldType name="long" class="solr.LongPointField" positionIncrementGap="0" />
<fieldType name="text" class="solr.TextField" autoGeneratePhraseQueries="true" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" splitOnCaseChange="1" splitOnNumerics="1" catenateWords="1" catenateNumbers="1" catenateAll="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15" />
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.SynonymGraphFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" splitOnCaseChange="1" splitOnNumerics="1" catenateWords="1" catenateNumbers="1" catenateAll="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15" />
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
</types>
<fields>
<field name="_version_" type="long" indexed="true" stored="true"/>
<field name="bcc" type="text" indexed="true" stored="false"/>
<field name="body" type="text" indexed="true" stored="false"/>
<field name="box" type="string" indexed="false" required="true" stored="true"/>
<field name="hdr" type="text" indexed="true" stored="false"/>
<field name="cc" type="text" indexed="true" stored="false"/>
<field name="from" type="text" indexed="true" stored="false"/>
<field name="id" type="string" indexed="true" required="true" stored="true"/>
<field name="subject" type="text" indexed="true" stored="false"/>
<field name="to" type="text" indexed="true" stored="false"/>
<field name="uid" type="long" indexed="true" required="true" stored="true"/>
<field name="user" type="string" indexed="true" required="true" stored="true"/>
</fields>
</schema>
On 12/4/2018 10:40 AM, Joan Moreau via dovecot wrote:
In the Wiki, ( https://wiki.dovecot.org/Plugins/FTS/Solr ), it would nice to stipulate to the reader to type the command :
sudo -u solr /opt/solr/bin/solr create -c dovecot # to create the dovecot instance
before updating the schema.xml .
Also, schema.xml is in /opt/solr/server/solr/dovecot/conf for archlinux users
Additionaly, the url is http://(solr_server):8983/solr/dovecot/ (error in wiki)
After installing Solr, wherever the installation sets up there should a folder similar to:
<your prefix>/solr/server/solr/configsets
If you look there, you'll probably see folders like '_default' and 'sample_techproducts_configs'. I haven't played with the 'techproducts' sample. Copy the '_default' folder, with all its contents, to a 'dovecot' folder. In the new dovecot folder, replace the 'managed-schema' file with the file from the Dovecot Wiki
https://wiki.dovecot.org/Plugins/FTS/Solr?action=AttachFile&do=view&target=solr-7.x-schema.xml
after that, you should be able to run 'solr /opt/solr/bin/solr create -c dovecot' to create the instance. If things still don't work let us know.
The schema is one I've tweaked and updated during my own migrations since Solr 3.3. It's possible there's something else in my config that needs documenting - but having experienced Solr search against my mailstore I never want to be without it.
Daniel