X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Ffulltext%2Fserv_fulltext.c;h=ba3f948a01af4885838f2918864738f11e2914eb;hb=13f214043d3697db7a3ca1c751cee41fd2fcf695;hp=b5753fbf63c95e4e156082f36da568d6d8ea9485;hpb=7b446ded2584f08fe51fe9327a3769acc6937c85;p=citadel.git diff --git a/citadel/modules/fulltext/serv_fulltext.c b/citadel/modules/fulltext/serv_fulltext.c index b5753fbf6..ba3f948a0 100644 --- a/citadel/modules/fulltext/serv_fulltext.c +++ b/citadel/modules/fulltext/serv_fulltext.c @@ -467,12 +467,24 @@ void initialize_ft_cache(void) { } +void ft_delete_remove(char *room, long msgnum) +{ + if (room) return; + + /* Remove from fulltext index */ + if (config.c_enable_fulltext) { + ft_index_message(msgnum, 0); + } +} + /*****************************************************************************/ CTDL_MODULE_INIT(fulltext) { initialize_ft_cache(); CtdlRegisterProtoHook(cmd_srch, "SRCH", "Full text search"); + CtdlRegisterDeleteHook(ft_delete_remove); + CtdlRegisterSearchFuncHook(ft_search, "fulltext"); CtdlRegisterMaintenanceThread ("indexer", indexer_thread); /* return our Subversion id for the Log */