Mercurial > dovecot > core-2.2
changeset 18922:91005181b997
fts-solr: "highest UID for mailbox" lookup was actually returning "highest UID for user"
If the default operator was OR instead of AND. This affected indexing mails
in newly created mailboxes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 07 Aug 2015 13:32:02 +0300 |
parents | c143d037fd54 |
children | 573118da2eaa |
files | src/plugins/fts-solr/fts-backend-solr-old.c src/plugins/fts-solr/fts-backend-solr.c |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/fts-solr/fts-backend-solr-old.c Fri Aug 07 12:58:30 2015 +0300 +++ b/src/plugins/fts-solr/fts-backend-solr-old.c Fri Aug 07 13:32:02 2015 +0300 @@ -306,10 +306,10 @@ box_name = fts_box_get_root(box, &ns); mailbox_get_open_status(box, STATUS_UIDVALIDITY, &status); - str_printfa(str, "uidv:%u+box:", status.uidvalidity); + str_printfa(str, "uidv:%u+AND+box:", status.uidvalidity); solr_quote_http(str, box_name); solr_add_ns_query_http(str, backend, ns); - str_append(str, "+user:"); + str_append(str, "+AND+user:"); solr_quote_http(str, ns->user->username); pool = pool_alloconly_create("solr last uid lookup", 1024);
--- a/src/plugins/fts-solr/fts-backend-solr.c Fri Aug 07 12:58:30 2015 +0300 +++ b/src/plugins/fts-solr/fts-backend-solr.c Fri Aug 07 13:32:02 2015 +0300 @@ -202,7 +202,7 @@ if (fts_mailbox_get_guid(box, &box_guid) < 0) return -1; - str_printfa(str, "box:%s+user:", box_guid); + str_printfa(str, "box:%s+AND+user:", box_guid); if (_backend->ns->owner != NULL) solr_quote_http(str, _backend->ns->owner->username); else