fts-backend-squat.c revision ebfbf5d78dcf95e8b176429f4b5b0694eb4e17d5
/* Copyright (C) 2006 Timo Sirainen */
#include "lib.h"
#include "array.h"
#include "mail-storage-private.h"
#include "mail-search.h"
#include "squat-trie.h"
#include "fts-squat-plugin.h"
#define SQUAT_FILE_PREFIX "dovecot.index.search"
struct squat_fts_backend {
struct fts_backend backend;
struct squat_trie *trie;
};
struct squat_fts_backend_build_context {
struct fts_backend_build_context ctx;
struct squat_trie_build_context *trie_ctx;
};
{
struct squat_fts_backend *backend;
struct mail_storage *storage;
struct mailbox_status status;
const char *path;
bool mmap_disable;
if (*path == '\0') {
/* in-memory indexes */
return NULL;
}
return NULL;
}
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
}
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
}
static struct fts_backend_build_context *
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
struct squat_fts_backend_build_context *ctx;
}
static int
{
struct squat_fts_backend_build_context *ctx =
(struct squat_fts_backend_build_context *)_ctx;
}
static int
{
struct squat_fts_backend_build_context *ctx =
(struct squat_fts_backend_build_context *)_ctx;
int ret;
return ret;
}
static void
{
}
unsigned int *message_count_r)
{
struct mail_search_arg search_arg;
struct mailbox_transaction_context *t;
struct mail_search_context *ctx;
unsigned int count = 0;
int ret;
t = mailbox_transaction_begin(box, 0);
count++;
}
*message_count_r = count;
return ret;
}
static void
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
unsigned int count;
if (!committed)
return;
t_push();
count);
}
t_pop();
}
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
}
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
}
static int
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
}
static int
{
struct squat_fts_backend *backend =
(struct squat_fts_backend *)_backend;
}
struct fts_backend fts_backend_squat = {
{
}
};