fts-api.h revision a0c453a8edaec90fb0d945c874de0b1845bc7d7e
#ifndef FTS_API_H
#define FTS_API_H
struct mail;
struct mailbox;
struct fts_backend_build_context;
#include "seq-range-array.h"
enum fts_lookup_flags {
FTS_LOOKUP_FLAG_HEADER = 0x01,
FTS_LOOKUP_FLAG_BODY = 0x02,
FTS_LOOKUP_FLAG_INVERT = 0x04
};
struct fts_score_map {
float score;
};
struct fts_backend *
/* Get the last_uid. */
/* Initialize adding new data to the index. last_uid_r is set to the last UID
that exists in the index. */
struct fts_backend_build_context **ctx_r);
/* Add more contents to the index. The data must contain only full valid
UTF-8 characters, but it doesn't need to be NUL-terminated. size contains
the data size in bytes, not characters. headers is TRUE if the data contains
message headers instead of message body. */
bool headers);
/* Finish adding new data to the index. */
/* Returns TRUE if there exists a build context. */
/* Expunge given mail from the backend. Note that the transaction may still
fail later. */
/* Called after transaction has been committed or rollbacked. */
locking timeouted, -1 if error.
It's not required to call these functions manually, but if you're doing
/* Start building a FTS lookup. */
struct fts_backend_lookup_context *
/* Add a new search key to the lookup. */
/* Finish the lookup and return found UIDs. */
#endif