Hi list,

I wanted to get SOLR 5.2 with dovecot running. My installation of solr 4.10 
with dovecot works so far.
It's a very basic installation with almost no configuration, so I gave 5.2 a 
try and just copied the conf directory of 4.10 to the fresh 5.2 core.

Dovecot reports that sent mails are being indexed according to logs:

Jun 13 11:08:42 mailtest dovecot: indexer-worker(user): Debug: http-client: 
conn 127.0.0.1:8983 [0]: Got 200 response for request [POST 
http://localhost:8983/solr/mail3/update] (took 33 ms + 0 ms in queue)
Jun 13 11:08:42 mailtest dovecot: indexer-worker(user): Debug: http-client: 
conn 127.0.0.1:8983 [0]: Response payload stream destroyed (0 ms after initial 
response)
Jun 13 11:08:42 mailtest dovecot: indexer-worker(user): Debug: http-client: 
request [POST http://localhost:8983/solr/mail3/update]: Finished

However, when trying to search I get an error in dovecot:

Jun 13 11:11:43 mailtest dovecot: imap(user): Debug: http-client: queue 
http://localhost:8983: Connection to peer 127.0.0.1:8983 claimed request [GET 
http://localhost:8983/solr/mail3/select?fl=uid,score&rows=3&sort=uid+asc&q=subject:%22blubb%22&fq=%2Bbox:b624920e60057c554e4a0000df211752+%2Buser:%22user%22]
 
Jun 13 11:11:43 mailtest dovecot: imap(user): Debug: http-client: conn 
127.0.0.1:8983 [0]: Claimed request [GET 
http://localhost:8983/solr/mail3/select?fl=uid,score&rows=3&sort=uid+asc&q=subject:%22blubb%22&fq=%2Bbox:b624920e60057c554e4a0000df211752+%2Buser:%22user%22]
Jun 13 11:11:43 mailtest dovecot: imap(user): Debug: http-client: request [GET 
http://localhost:8983/solr/mail3/select?fl=uid,score&rows=3&sort=uid+asc&q=subject:%22blubb%22&fq=%2Bbox:b624920e60057c554e4a0000df211752+%2Buser:%22user%22]:
 Sent header
Jun 13 11:11:43 mailtest dovecot: imap(user): Debug: http-client: conn 
127.0.0.1:8983 [0]: Got 400 response for request [GET 
http://localhost:8983/solr/mail3/select?fl=uid,score&rows=3&sort=uid+asc&q=subject:%22blubb%22&fq=%2Bbox:b624920e60057c554e4a0000df211752+%2Buser:%22user%22]
 (took 4 ms + 1 ms in queue)
Jun 13 11:11:43 mailtest dovecot: imap(user): Error: fts_solr: Lookup failed: 
Bad Request

In SOLR webadmin I get the message "org.apache.solr.common.SolrException: Bad 
contentType for search handler :text/xml 
request={sort=uid+asc&fl=uid,​score&q=subject:"blubb"&fq=%2Bbox:b624920e60057c554e4a0000df211752+%2Buser:"lukas"&rows=3}"

or to be precise: 

"org.apache.solr.common.SolrException: Bad contentType for search handler 
:text/xml 
request={sort=uid+asc&fl=uid,score&q=subject:"blubb"&fq=%2Bbox:b624920e60057c554e4a0000df211752+%2Buser:"lukas"&rows=3}
        at 
org.apache.solr.request.json.RequestUtil.processParams(RequestUtil.java:74)
        at 
org.apache.solr.util.SolrPluginUtils.setDefaults(SolrPluginUtils.java:167)
        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064)
        at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:640)
        at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:436)
        at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:227)
        at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196)
        at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
        at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:497)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at 
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)"


The schema.xml:
<?xml version="1.0" encoding="UTF-8" ?>

<!--
For fts-solr:

This is the Solr schema file, place it into solr/conf/schema.xml. You may
want to modify the tokenizers and filters.
-->
<schema name="dovecot" version="1.5">
  <types>
    <!-- IMAP has 32bit unsigned ints but java ints are signed, so use longs -->
    <fieldType name="string" class="solr.StrField" />
    <fieldType name="long" class="solr.TrieLongField" />
    <fieldType name="boolean" class="solr.BoolField" />

    <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="lang/stopwords_en.txt"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" 
generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" 
splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EnglishPossessiveFilterFactory"/>
        <filter class="solr.KeywordMarkerFilterFactory" 
protected="protwords.txt"/>
        <filter class="solr.EnglishMinimalStemFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" 
ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="lang/stopwords_en.txt"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" 
generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" 
splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EnglishPossessiveFilterFactory"/>
        <filter class="solr.KeywordMarkerFilterFactory" 
protected="protwords.txt"/>
        <filter class="solr.EnglishMinimalStemFilterFactory"/>
      </analyzer>
    </fieldType>
 </types>


 <fields>
   <field name="id" type="string" indexed="true" stored="true" required="true" 
/>
   <field name="uid" type="long" 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" />
   <field name="text" type="text" indexed="true" stored="false" />

   <!-- Used by Solr internally: -->
   <field name="_version_" type="long" indexed="true" stored="true"/>
 </fields>

 <uniqueKey>id</uniqueKey>
</schema>



Any help would be highly appreciated! 

TIA,
infoomatic

Reply via email to