Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4948:66c1578edc0e HEAD
Don't build indexes just for header lookups.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 21 Dec 2006 16:21:24 +0200 |
parents | 8be1ce6cfeec |
children | a959d4208b54 |
files | src/plugins/fts/fts-storage.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/fts/fts-storage.c Thu Dec 21 15:56:50 2006 +0200 +++ b/src/plugins/fts/fts-storage.c Thu Dec 21 16:21:24 2006 +0200 @@ -230,6 +230,12 @@ if (fts_backend_get_last_uid(backend, &last_uid) < 0) return -1; + if (last_uid == 0 && fctx->best_arg->type == SEARCH_HEADER) { + /* index doesn't exist. we're not creating it just for + header lookups. */ + return -1; + } + memset(&seqset, 0, sizeof(seqset)); if (mailbox_get_uids(t->box, last_uid+1, (uint32_t)-1, &seqset.seq1, &seqset.seq2) < 0) @@ -257,7 +263,6 @@ } } - ctx = i_new(struct fts_storage_build_context, 1); ctx->build = build; ctx->seqset = seqset;