#ifndef SEARCHSWISH_H #define SEARCHSWISH_H 1 #include "time.h" /* for time_t, which isn't really needed */ #ifdef __cplusplus extern "C" { #endif typedef void * SW_HANDLE; typedef void * SW_SEARCH; typedef void * SW_RESULTS; typedef void * SW_RESULT; typedef void * SW_FUZZYWORD; /* access to the swish-e stemmers */ /* These must match headers.h */ typedef enum { SWISH_NUMBER, SWISH_STRING, SWISH_LIST, SWISH_BOOL, SWISH_WORD_HASH, SWISH_OTHER_DATA, SWISH_HEADER_ERROR /* must check error in this case */ } SWISH_HEADER_TYPE; typedef union { const char *string; const char **string_list; unsigned long number; int boolean; } SWISH_HEADER_VALUE; const char **SwishHeaderNames( SW_HANDLE ); /* fetch the list of available header names */ const char **SwishIndexNames( SW_HANDLE ); /* fetch list of index files names associated */ SWISH_HEADER_VALUE SwishHeaderValue( SW_HANDLE, const char *index_name, const char *cur_header, SWISH_HEADER_TYPE *type ); SWISH_HEADER_VALUE SwishResultIndexValue( SW_RESULT, const char *name, SWISH_HEADER_TYPE *type ); /* Limit searches by structure */ #define IN_FILE_BIT 0 #define IN_TITLE_BIT 1 #define IN_HEAD_BIT 2 #define IN_BODY_BIT 3 #define IN_COMMENTS_BIT 4 #define IN_HEADER_BIT 5 #define IN_EMPHASIZED_BIT 6 #define IN_META_BIT 7 #define IN_FILE (1<