Solr 6.4.1 config

Daniel Miller dmiller at amfes.com
Tue Feb 28 04:07:13 UTC 2017


Since I was recently asked off-list - thought I'd make this available if 
it will help anyone else.  Attached is my (I hope) working 6.4.1 
config.  Also some instructions:

First, you have to decide if you're running in standalone or cloud 
mode.  Standalone is simpler, but I seem to be having better luck 
running in cloud mode - even though I'm only using a single 
server/core/shard/collection/whatever.

I've attached my config.  Unzip this somewhere convenient - I will 
assume "/tmp/solr-dovecot".  You may want to tweak it - this is adapted 
from my version 4 config and is set for English.  If you look in 
solrbasedir/example/files/conf/lang or 
/solrbasedir/server/solr/configsets/basic_configs/conf/lang you'll find 
alternatives for "stopwords.txt" - I simply copied the 
"stopwords_en.txt" file directly to "conf/stopwords.txt".

Assuming you extracted the Solr distribution to a base folder, such as 
/opt/solr-6.4.1, change to that folder.

Then execute (again, /tmp/solr-dovecot is the path you extracted my 
config into):

bin/solr create_collection -c dovecot -d /tmp/solr-dovecot

That should create a minimal cloud instance.  Then start it:

bin/solr start -c

And hopefully...you'll have a running Solr server.  Assuming that's the 
case - since you've now created a "named" collection you have to specify 
that for Dovecot. So the fts_solr parameter in 90-plugin.conf needs to 
be something like:

fts_solr = break-imap-search url=http://ser.ver.ip:8983/solr/dovecot/

Restart Dovecot...and with luck you're searching now.

Hope this helps somebody!

Daniel

On 2/10/2017 3:15 PM, Daniel Miller wrote:
> 2.2.18
>
> On 2/9/2017 11:13 PM, Aki Tuomi wrote:
>> What dovecot version are you using?
>>
>>
>> On 10.02.2017 09:12, Aki Tuomi wrote:
>>> Yeah, thanks.
>>>
>>> It seems that there indeed is content-type header (there should not 
>>> be).
>>> We'll look into it.
>>>
>>> Aki
>>>
>>> On 10.02.2017 01:44, Daniel Miller wrote:
>>>> Does this work (pcap attached)?
>>>>
>>>> Daniel
>>>>
>>>> On 2/8/2017 10:57 PM, Aki Tuomi wrote:
>>>>> On 09.02.2017 07:54, Daniel Miller wrote:
>>>>>> I've been running Solr for a while (4.10.3) - wanted to make the 
>>>>>> jump
>>>>>> to the latest & greatest.  I installed 6.4.1, copied over my
>>>>>> schema.xml - and after a couple false starts where I needed to tweak
>>>>>> it work with the new version...it works!  I did not copy the 
>>>>>> database,
>>>>>> started from scratch, and executed a "doveadm fts rescan -A".  
>>>>>> But...
>>>>>>
>>>>>> Judging solely from at least one client - it's fine. But looking in
>>>>>> the logs I see:
>>>>>> 1.  The first scan of a mailbox dovecot's error log gives:
>>>>>>      dovecot: imap(dmiller at amfes.com): Error: fts_solr: Lookup 
>>>>>> failed:
>>>>>> Bad Request
>>>>>>
>>>>>> 2.  Subsequent scans do not appear to generate any dovecot error 
>>>>>> logs
>>>>>> - but I'm not certain.  Each new mailbox/subfolder scanned will each
>>>>>> have one error on the initial scan.
>>>>>>
>>>>>> 3.  Solr's log gives me the following - on every search.
>>>>>> 2017-02-09 05:50:12.412 ERROR (qtp205125520-15) [ x:dovecot]
>>>>>> o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Bad
>>>>>> contentType for search handler :text/xml
>>>>>> request={q=from:"test"+OR+to:"test"+OR+cc:"test"+OR+subject:"test"+OR+body:"test"&fl=uid,score&sort=uid+asc&fq=%2Bbox:c1af150abfc9df4d7f7a00003bc41c5f+%2Buser:"dmiller at amfes.com"&rows=67135} 
>>>>>>
>>>>>>
>>>>> Hi!
>>>>>
>>>>> can you please use tcpdump or wireshark to capture the actual HTTP
>>>>> request causing this exception?
>>>>>
>>>>> Aki

-------------- next part --------------
A non-text attachment was scrubbed...
Name: solrconf.zip
Type: application/octet-stream
Size: 41041 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20170227/ab4e2fd3/attachment-0001.obj>


More information about the dovecot mailing list