citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

serv_fulltext.c File Reference
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <time.h>
#include <sys/wait.h>
#include <string.h>
#include <limits.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
#include "database.h"
#include "msgbase.h"
#include "control.h"
#include "serv_fulltext.h"
#include "ft_wordbreaker.h"
#include "threads.h"
#include "context.h"
#include "ctdl_module.h"
Include dependency graph for serv_fulltext.c:

Go to the source code of this file.

Functions

int longcmp (const void *rec1, const void *rec2)
 
void ft_flush_cache (void)
 
void ft_index_message (long msgnum, int op)
 
void ft_index_msg (long msgnum, void *userdata)
 
void ft_index_room (struct ctdlroom *qrbuf, void *data)
 
void do_fulltext_indexing (void)
 
void ft_search (int *fts_num_msgs, long **fts_msgs, const char *search_string)
 
void cmd_srch (char *argbuf)
 
void initialize_ft_cache (void)
 
void ft_delete_remove (char *room, long msgnum)
 
char * ctdl_module_fulltext_init (int threading)
 

Variables

long ft_newhighest = 0L
 
long * ft_newmsgs = NULL
 
int ft_num_msgs = 0
 
int ft_num_alloc = 0
 
int ftc_num_msgs [65536]
 
long * ftc_msgs [65536]
 

Function Documentation

◆ cmd_srch()

void cmd_srch ( char *  argbuf)

◆ ctdl_module_fulltext_init()

◆ do_fulltext_indexing()

◆ ft_delete_remove()

void ft_delete_remove ( char *  room,
long  msgnum 
)

Definition at line 453 of file serv_fulltext.c.

References CtdlGetConfigInt(), and ft_index_message().

Referenced by ctdl_module_fulltext_init().

◆ ft_flush_cache()

void ft_flush_cache ( void  )

Definition at line 76 of file serv_fulltext.c.

References CDB_FULLTEXT, cdb_store(), free(), ftc_msgs, and ftc_num_msgs.

Referenced by do_fulltext_indexing().

◆ ft_index_message()

◆ ft_index_msg()

void ft_index_msg ( long  msgnum,
void *  userdata 
)

Definition at line 200 of file serv_fulltext.c.

References CtdlGetConfigLong(), ft_newhighest, ft_newmsgs, ft_num_alloc, and ft_num_msgs.

Referenced by ft_index_room().

◆ ft_index_room()

void ft_index_room ( struct ctdlroom qrbuf,
void *  data 
)

◆ ft_search()

void ft_search ( int *  fts_num_msgs,
long **  fts_msgs,
const char *  search_string 
)

◆ initialize_ft_cache()

void initialize_ft_cache ( void  )

Definition at line 447 of file serv_fulltext.c.

References ftc_msgs, and ftc_num_msgs.

Referenced by ctdl_module_fulltext_init().

◆ longcmp()

int longcmp ( const void *  rec1,
const void *  rec2 
)

Definition at line 61 of file serv_fulltext.c.

Referenced by do_fulltext_indexing(), and ft_search().

Variable Documentation

◆ ft_newhighest

long ft_newhighest = 0L

Definition at line 49 of file serv_fulltext.c.

Referenced by do_fulltext_indexing(), and ft_index_msg().

◆ ft_newmsgs

long* ft_newmsgs = NULL

Definition at line 50 of file serv_fulltext.c.

Referenced by do_fulltext_indexing(), and ft_index_msg().

◆ ft_num_alloc

int ft_num_alloc = 0

Definition at line 52 of file serv_fulltext.c.

Referenced by do_fulltext_indexing(), and ft_index_msg().

◆ ft_num_msgs

int ft_num_msgs = 0

Definition at line 51 of file serv_fulltext.c.

Referenced by do_fulltext_indexing(), and ft_index_msg().

◆ ftc_msgs

long* ftc_msgs[65536]

Definition at line 55 of file serv_fulltext.c.

Referenced by ft_flush_cache(), ft_index_message(), ft_search(), and initialize_ft_cache().

◆ ftc_num_msgs

int ftc_num_msgs[65536]

Definition at line 54 of file serv_fulltext.c.

Referenced by ft_flush_cache(), ft_index_message(), ft_search(), and initialize_ft_cache().