[Dovecot] dovecot fts solr plugin

Thomas Baumann list.dovecot at tiri.li
Sun Jul 21 23:11:30 EEST 2013


Hello list,

  * apache-solr-3.6.2
  * dovecot-2.1.7

I configured fts_solr for dovecot, but I have two issues

When doing a search request within telnet 127.0.0.1 143 it connects to solr.

Jul 21, 2013 4:38:15 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select
params={rows=1&q=box:10361d30f8c4ea51ad7c00002ecaff3b+user:"
tom at tirism.support.tiri.li"&sort=uid+desc&fl=uid} hits=0 status=0 QTime=10
Jul 21, 2013 4:38:15 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select
params={rows=3&q=(hdr:"test"+OR+body:"test")&fq=%2Bbox:10361d30f8c4ea51ad7c00002ecaff3b+%2Buser:"
tom at tirism.support.tiri.li"&sort=uid+asc&fl=uid,score} hits=0 status=0
QTime=7

But

(1) doveadm fts fails:

$ doveadm  fts rescan -u tom at domain.com

Error message:
doveadm(tom at tirism.support.tiri.li): Error: fts not enabled for user's
namespace (null)

(2)
solr schema has errors

Jul 21, 2013 4:35:46 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: undefined field text
        at
org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1330)
        at
org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getAnalyzer(IndexSchema.java:408)
        at
org.apache.solr.schema.IndexSchema$SolrIndexAnalyzer.reusableTokenStream(IndexSchema.java:383)
        at
org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:574)
        at
org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:206)
        at
org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1436)
        at
org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1319)
        at
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1245)
        at
org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
        at
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
        at
org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:79)
        at org.apache.solr.search.QParser.getQuery(QParser.java:143)
        at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:105)
        at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:165)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
        at
org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:59)
        at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1182)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
        at java.util.concurrent.FutureTask.run(FutureTask.java:149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
        at java.lang.Thread.run(Thread.java:736)

Hope somebody can help!

Best regards,
Thomas

# dovecot --version
2.1.7

# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.0.74-0.6.10-default x86_64 SUSE Linux Enterprise Server 11
(x86_64) xfs
base_dir = /var/run/dovecot/
dict {
  expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_uid = 5000
listen = *
login_greeting = tiri Mail ready.
login_trusted_networks = 127.0.0.1
mail_location = maildir:/var/vmail/%u/
mail_plugins = fts fts_solr
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
copy include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  driver = pam
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
ssl = no
userdb {
  driver = passwd
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol imap {
  plugin {
    fts = solr
    fts_solr = break-imap-search url=http://localhost:8983/solr/
  }
}
protocol pop3 {
  plugin {
    fts = solr
    fts_solr = break-imap-search url=http://localhost:8983/solr/
  }
}


More information about the dovecot mailing list