fts_solr does not quote lucene's special characters
ms at mike2k.de
Sun Nov 1 17:03:36 UTC 2015
I am using Dovecot 2.2.19 with the solr backend for full text search
and experience the following issue.
When I issue a search that includes characters that are part of lucene's
query syntax (e.g. the double quote character), dovecot does not escape
the special characters and issues a request with invalid syntax to the
For example, I search for foo"bar, then my IMAP client (roundcube) sends
the following to dovecot:
A0003 UID THREAD REFS US-ASCII ALL UNDELETED BODY "foo\"bar"
Dovecot in turn uses the following request URI to query SOLR:
HTTP/1.1" 400 994
Solr responds with error 400 and the following body:
type Status report
description The request sent by the client was syntactically incorrect.
This is because the " character in foo"bar is not quoted in the solr
request. When I adapt the request to quote the " character solr succeeds
with the expected result:
HTTP/1.1" 200 535
A fix for this would be highly appreciated.
More information about the dovecot