fts-backend-squat.c revision 5601c23c0d59376dfda22c7eb807c9e1a0870426
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainen/* Copyright (c) 2006-2011 Dovecot authors, see the included COPYING file */
7d6389e4053c2dac1fb37180b5756b00785983dcTimo Sirainen#define SQUAT_FILE_PREFIX "dovecot.index.search"
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainenstatic struct fts_backend *fts_backend_squat_alloc(void)
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainenfts_backend_squat_init(struct fts_backend *_backend, const char **error_r)
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainen unsigned int len;
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainen env = mail_user_plugin_getenv(_backend->ns->user, "fts_squat");
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainen for (tmp = t_strsplit_spaces(env, " "); *tmp != NULL; tmp++) {
d1f0acc7fc722e13e8296228703adfe8a884d59eTimo Sirainen if (str_to_uint(*tmp + 8, &len) < 0 || len == 0) {
const char *path;
static struct fts_backend_update_context *
struct mailbox_transaction_context *t;
int ret;
(void)mailbox_transaction_commit(&t);
return ret;
int ret = 0;
return ret;
int ret = 0;
return ret;
return ret;
return FALSE;
i_unreached();
return TRUE;
int ret;
case SEARCH_TEXT:
case SEARCH_BODY:
case SEARCH_HEADER:
case SEARCH_HEADER_ADDRESS:
i_unreached();
if (and_args) {
int ret;
if (ret < 0)
if (ret > 0)