]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixed searching multiple mailboxes
authorx16a0 <m.k-92@gmx.de>
Fri, 15 Jul 2016 07:53:12 +0000 (09:53 +0200)
committerGitLab <gitlab@git.dovecot.net>
Thu, 4 Aug 2016 17:28:51 +0000 (20:28 +0300)
When searching multiple mailboxes, a condition to search these mailboxes is added to the query string. However, this condition has to be separated from the preceding condition by a space (a '+' in this case, as it's encoded); otherwise, Solr considers it to be part of the previous condition, in which case it will fail to parse it properly. Therefore, this patch adds that one missing character so it works again.

src/plugins/fts-solr/fts-backend-solr.c

index 329dcc7aaba37c0266dd9a902b9e86beee4e427b..d0c85d3cdb830552b3458a1b55d97db98f8fb855 100644 (file)
@@ -875,7 +875,7 @@ solr_search_multi(struct fts_backend *_backend, string_t *str,
        for (i = 0; boxes[i] != NULL; i++) ;
        search_all_mailboxes = i > SOLR_QUERY_MAX_MAILBOX_COUNT;
        if (!search_all_mailboxes)
-               str_append(str, "%2B(");
+               str_append(str, "+%2B(");
        len = str_len(str);
 
        for (i = 0; boxes[i] != NULL; i++) {