Skip to content

Commit

Permalink
Fixed searching multiple mailboxes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
serenesilence authored and GitLab committed Aug 4, 2016
1 parent 9224645 commit 42c7732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/fts-solr/fts-backend-solr.c
Expand Up @@ -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++) {
Expand Down

0 comments on commit 42c7732

Please sign in to comment.