struct cdbdata *cdb_bucket;
char *msgtext;
int tok;
+ struct CtdlMessage *msg = NULL;
+
+ msg = CtdlFetchMessage(msgnum, 1);
+ if (msg == NULL) {
+ CtdlLogPrintf(CTDL_ERR, "ft_index_message() could not load msg %ld\n", msgnum);
+ return;
+ }
+
+ if (msg->cm_fields['1'] != NULL) {
+ CtdlLogPrintf(CTDL_DEBUG, "ft_index_message() excluded msg %ld\n", msgnum);
+ CtdlFreeMessage(msg);
+ return;
+ }
CtdlLogPrintf(CTDL_DEBUG, "ft_index_message() %s msg %ld\n",
(op ? "adding" : "removing") , msgnum
CC->redirect_buffer = malloc(SIZ);
CC->redirect_len = 0;
CC->redirect_alloc = SIZ;
- CtdlOutputMsg(msgnum, MT_CITADEL, HEADERS_ALL, 0, 1, NULL, 0);
+ CtdlOutputPreLoadedMsg(msg, MT_CITADEL, HEADERS_ALL, 0, 1, 0);
+ CtdlFreeMessage(msg);
msgtext = CC->redirect_buffer;
CC->redirect_buffer = NULL;
CC->redirect_len = 0;
/*
- * Begin the fulltext indexing process. (Called as an EVT_TIMER event)
+ * Begin the fulltext indexing process.
*/
void do_fulltext_indexing(void) {
int i;
* (This one does the "all of these words" search.)
* Caller is responsible for freeing the message list.
*/
-void ft_search(int *fts_num_msgs, long **fts_msgs, char *search_string) {
+void ft_search(int *fts_num_msgs, long **fts_msgs, const char *search_string) {
int num_tokens = 0;
int *tokens = NULL;
int i, j;