From: x16a0 Date: Fri, 15 Jul 2016 07:53:12 +0000 (+0200) Subject: Fixed searching multiple mailboxes X-Git-Tag: 2.2.26~421 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02d7058e95a0b2a4e7b926a5450b1470eceae328;p=thirdparty%2Fdovecot%2Fcore.git Fixed searching multiple mailboxes 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. --- diff --git a/src/plugins/fts-solr/fts-backend-solr.c b/src/plugins/fts-solr/fts-backend-solr.c index 5d0d3ac390..6fa5f11ca5 100644 --- a/src/plugins/fts-solr/fts-backend-solr.c +++ b/src/plugins/fts-solr/fts-backend-solr.c @@ -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++) {