#ifndef FTS_API_PRIVATE_H
#define FTS_API_PRIVATE_H
#include "unichar.h"
#include "fts-api.h"
struct mail_user;
struct mailbox_list;
struct fts_backend_vfuncs {
struct fts_backend_update_context *
/* Start a build for specified key */
const struct fts_backend_build_key *key);
/* Finish a build for specified key - guaranteed to be called */
/* Add data for current build key */
const struct mail_search_arg *args);
struct fts_result *result);
struct mail_search_arg *args,
enum fts_lookup_flags flags,
struct fts_multi_result *result);
};
enum fts_backend_flags {
/* Backend supports indexing binary MIME parts */
/* Send built text to backend normalized rather than
preserving original case */
/* Send only fully indexable words rather than randomly sized blocks */
/* Fuzzy search works */
/* Tokenize all the input. update_build_more() will be called a single
directly indexable token at a time. Searching will modify the search
args so that lookup() sees only tokens that can be directly
searched. */
};
struct fts_backend {
const char *name;
struct fts_backend_vfuncs v;
};
struct fts_backend_update_context {
};
struct fts_index_header {
/* Checksum of settings. If the settings change, the index should
be rebuilt. */
};
void fts_backend_unregister(const char *name);
const struct mail_search_arg *args);
/* Returns TRUE if ok, FALSE if no fts header */
const struct fts_index_header *hdr);
/* Returns TRUE if FTS backend should index the header for optimizing
separate lookups */
bool fts_header_want_indexed(const char *hdr_name);
/* Returns TRUE if header's values should be considered to have a language. */
bool fts_header_has_language(const char *hdr_name);
#endif