|
Data Structures |
struct | searchm_nodeelem |
| node elements of a list. More...
|
struct | searchm_metaelem |
| A metaname element in the meta list. More...
|
struct | searchm_metalist |
| The meta list. More...
|
struct | searchm_termitem |
| An element in searchm_termlist. More...
|
struct | searchm_termlist |
| A terms list. More...
|
struct | searchm_limit_data |
| The information from the command/ query line necessary to build the SwishSetSearchLimit paramters. More...
|
struct | searchm_config |
| The module per server configuration data. Initialized to all zeros! More...
|
struct | searchm_dir_config |
| The module per directory configuration data. More...
|
struct | searchm_sub_query |
| The information from command/ query line necessary to create a sub-query. More...
|
struct | searchm_sortpair |
| The information from the command/ query line for a sort pair. More...
|
struct | searchm_indexfile |
| The information from the command/ query line for index. More...
|
struct | searchm_cmd_line |
| The values parsed from the command/ query line. More...
|
struct | searchm_tags |
| The tags cache. More...
|
struct | query_info |
| Information about the query. More...
|
struct | searchm_dbpkt |
| The database packet header information. File based databases are machine dependent and cannot be shared. sizeof(searchm_dbpkt) and byte order is machine dependent. More...
|
struct | searchm_buffer |
| A temporary dynamic buffer. More...
|
struct | searchm_cleanup_data |
Defines |
#define | SEARCHM_PURGE_TIME (120) |
#define | SEARCHM_INVALIDATE_TIME (10) |
#define | SEARCHM_KEY_PURGETIME "SEARCHMTIME" |
#define | SEARCHM_CACHE_SIZE (1 * 1024) |
#define | SEARCHM_TAG_BEGIN '<' |
#define | SEARCHM_TAG_ID "<SEARCHM:" |
#define | SEARCHM_TAG_END '>' |
#define | SEARCHM_DEFAULT_COOKIE_NAME "SEARCHM" |
| The default cookie name. If a setting for mod_usertrack CookieName is not given, then use this.
|
#define | SEARCHM_DESC_HTML_HILITE_BEGIN "<b><i>" |
| The HTML info to preceed the highlited text.
|
#define | SEARCHM_DESC_HTML_HILITE_END "</i></b>" |
| The HTML info to follow the hilighted text.
|
#define | SEARCHM_AND_WORD "and" |
| The AND conjunction. Override using SwishSearchOperators.
|
#define | SEARCHM_OR_WORD "or" |
| The OR conjuction. Override using SwishSearchOperators.
|
#define | SEARCHM_NOT_WORD "not" |
| The NOT conjuction. Override using SwishSearchOperators.
|
#define | SEARCHM_DEFAULT_RULE SEARCHM_AND_RULE |
| A missing boolean conjunction defaults to: Override using SwishSearchDefineRule.
|
#define | SEARCHM_DEFAULT_METANAME "swishdefault" |
| The Swish-e C API default metaname.
|
#define | SEARCHM_ENC_GB "%28" |
#define | SEARCHM_ENC_GE "%29" |
#define | SEARCHM_ENC_BOL "%5e" |
#define | SEARCHM_ENC_EOL "%24" |
#define | SEARCHM_ENC_AL "%7c" |
#define | SEARCHM_ENC_ZOM "%2a" |
#define | SEARCHM_ENC_OOM "%2b" |
#define | SEARCHM_ENC_AC "%2e" |
#define | SEARCHM_ENC_SP "%5b%5b%3aspace%3a%5d%5d" |
#define | SEARCHM_RE_SPACE "[[:space:]]" |
#define | SEARCHM_RE_NOT_SPACE "[^[:space:]]" |
#define | SEARCHM_ENC_NOT_SP "%5b" SEARCHM_ENC_BOL "%5b%3aspace%3a%5d%5d" |
#define | SEARCHM_RE_START "(^|" SEARCHM_RE_SPACE ")(" |
#define | SEARCHM_ENC_RE_START SEARCHM_ENC_GB SEARCHM_ENC_BOL SEARCHM_ENC_AL SEARCHM_ENC_SP SEARCHM_ENC_GE SEARCHM_ENC_GB |
#define | SEARCHM_RE_END ")(" SEARCHM_RE_SPACE "|$)" |
#define | SEARCHM_ENC_RE_END SEARCHM_ENC_GE SEARCHM_ENC_GB SEARCHM_ENC_SP SEARCHM_ENC_AL SEARCHM_ENC_EOL SEARCHM_ENC_GE |
#define | NULL_STRCMP_CASE 0 |
#define | NULL_STRCMP_NOCASE 1 |
#define | SEARCHM_NUM_SUB_MATCHES 4 |
#define | SEARCHM_USE_SUB_MATCH 2 |
#define | SEARCHM_SUCCESS APR_SUCCESS |
#define | SEARCHM_ERROR_ (APR_OS_START_USEERR + 1) |
#define | SEARCHM_ERROR_METHOD_NOT_ALLOWED (APR_OS_START_USEERR + 2) |
#define | SEARCHM_ERROR_BAD_REQUEST (APR_OS_START_USEERR + 3) |
#define | SEARCHM_INTERNAL_SERVER_ERROR (APR_OS_START_USEERR + 4) |
#define | SEARCHM_UNAUTHORIZED (APR_OS_START_USEERR + 5) |
#define | SEARCHM_ERROR_DOC (APR_OS_START_USEERR + 6) |
#define | SEARCHM_ERROR_NOHITS (APR_OS_START_USEERR + 7) |
#define | SEARCHM_ERROR_BUFFEROVERFLOW -1 |
#define | SEARCHM_ERROR_MALLOC -2 |
#define | SEARCHM_ERROR_INVALID_INDEX -3 |
#define | SEARCHM_ERROR_TAG_CACHE_SYNC -4 |
#define | SEARCHM_ERROR_FILE -5 |
#define | SEARCHM_ERROR_INVALID_QUERY -6 |
#define | SEARCHM_ERROR_INVALID_CONTENT_TYPE -8 |
#define | SEARCHM_ERROR_ABSOLUTE -10 |
#define | SEARCHM_ERROR_RELATIVE -11 |
#define | SEARCHM_ERROR_STRICT -12 |
#define | SEARCHM_ERROR_SWISH -13 |
#define | SEARCHM_ENDOFFILE -15 |
#define | SEARCHM_MAX_SUBQUERIES 10 |
| The maximum number of metatagN, queryN, and conjN triplets. The maximum number of subqueries. The value of N. This number may not exceed 32.
|
#define | SEARCHM_PARAMETER_METATAG "metatag" |
| The metatag triplet parameter name.
|
#define | SEARCHM_PARAMETER_QUERY "query" |
| The query triplet parameter name.
|
#define | SEARCHM_PARAMETER_CONJ "conj" |
| The conj triplet parameter name.
|
#define | SEARCHM_MAX_SORTPAIRS 4 |
| The maximum number of sort pairs that may be specified on the command/query line. May not exceed 32.
|
#define | SEARCHM_PARAMETER_SORT "sort" |
| The sort 'sort pairs' parameter name.
|
#define | SEARCHM_PARAMETER_ORDER "order" |
| The order 'sort pairs' parameter name.
|
#define | SEARCHM_MAX_INDEX 4 |
| The maximum number of "non empty string" indexN= parameters that may be specified on the comand/ query line.
|
#define | SEARCHM_PARAMETER_INDEX "index" |
| The index parameter name.
|
#define | SEARCHM_PARAMETER_DISPLAY "display" |
| The display parameter name.
|
#define | SEARCHM_PARAMETER_PAGE "page" |
| The page parameter name.
|
#define | SEARCHM_PARAMETER_WITHIN "within" |
| The within parameter name.
|
#define | SEARCHM_PARAMETER_REQID "reqid" |
| The request ID parameter name.
|
#define | SEARCHM_ITEMLIST_UNIQUE 0 |
| The itemlist is unique. All weights must be unique.
|
#define | SEARCHM_ITEMLIST_NONUNIQUE 1 |
| The itemlist is not unique. Weights may be equal.
|
#define | SEARCHM_ITEMLIST_EMPTY (-INT_MAX) |
| The element is currently empty.
|
#define | SEARCHM_MAX_TERMS_LIST 32 |
| The maximum number of terms in a terms list.
|
#define | SEARCHM_ERROR_NOTES "error-notes" |
| For APLOG_TOCLIENT key.
|
#define | SEARCHM_LIMIT_STRING "limit" |
| The limit parameter name. must be unique.
|
#define | SEARCHM_LIMIT_MAX 2 |
| The maximum number of limitN paramters.
|
#define | SEARCHM_LIMIT_MAX_SUB 7 |
| The maximum number of limitN_low/hi_X sub parameters.
|
#define | SEARCHM_IN_ALL (1<<8) |
#define | SEARCHM_BUFFER_CHUNK 1024 |
| A chunk in a buffer.
|
#define | SEARCHM_UNIQUEID_SIZE (APR_MD5_DIGESTSIZE * 2) |
| The size, in bytes, of the unique id byte string.
|
#define | SEARCHM_BDB_MAX_ENV 32 |
#define | SEARCHM_BDB_MAX_DB 32 |
#define | SEARCHM_CONFIG_ICASE 0 |
| Compare environments and filenames case. 0 = case is significant. 1 = ignore case.
|
#define | DB_SEARCHM "DB_SEARCHM" |
| The name (internal to BDB file).
|
#define | SEARCHM_BDB_MASTERLOCK "SEARCHM_BDB_MASETERLOCK" |
| The BDB Master lock object.
|
#define | MOD_SEARCHM_SET_MUTEX_PERMS |
#define | INITIALIZE_SEARCHM_DIR_CONFIG |
Typedefs |
typedef enum searchm_state | searchm_state_e |
typedef enum searchm_termtype | searchm_termtype_e |
typedef searchm_nodeelem | searchm_nodeelem_t |
typedef searchm_nodeelem * | p_searchm_nodeelem_t |
typedef searchm_metaelem | searchm_metaelem_t |
typedef searchm_metaelem * | p_searchm_metaelem_t |
typedef searchm_metalist | searchm_metalist_t |
typedef searchm_metalist * | p_searchm_metalist_t |
typedef searchm_termitem | searchm_termitem_t |
typedef searchm_termitem * | p_searchm_termitem_t |
typedef searchm_termlist | searchm_termlist_t |
typedef searchm_termlist * | p_searchm_termlist_t |
typedef enum searchm_tag_ids | searchm_tag_ids_e |
typedef enum searchm_auto_tags | searchm_auto_tags_e |
typedef enum searchm_itemlist | searchm_itemlist_e |
typedef enum searchm_limit_attr_type | searchm_limit_attr_type_e |
typedef enum searchm_limit_attr_type * | p_searchm_limit_attr_type_e |
typedef enum searchm_limit_attr | searchm_limit_attr_e |
typedef enum searchm_limit_attr * | p_searchm_limit_attr_e |
typedef searchm_limit_data | searchm_limit_data_t |
typedef searchm_limit_data * | p_searchm_limit_data_t |
typedef searchm_config | searchm_config_t |
typedef searchm_config * | p_searchm_config_t |
typedef searchm_dir_config | searchm_dir_config_t |
typedef searchm_dir_config * | p_searchm_dir_config_t |
typedef searchm_sub_query | searchm_sub_query_t |
typedef searchm_sub_query * | p_searchm_sub_query_t |
typedef searchm_sortpair | searchm_sortpair_t |
typedef searchm_sortpair * | p_searchm_sortpair_t |
typedef searchm_indexfile | searchm_indexfile_t |
typedef searchm_indexfile * | p_searchm_indexfile_t |
typedef searchm_cmd_line | searchm_cmd_line_t |
typedef searchm_cmd_line * | p_searchm_cmd_line_t |
typedef searchm_tags | searchm_tags_t |
typedef searchm_tags * | p_searchm_tags_t |
typedef query_info | query_info_t |
typedef query_info * | p_query_info_t |
typedef searchm_dbpkt | searchm_dbpkt_t |
typedef searchm_dbpkt * | p_searchm_dbpkt_t |
typedef searchm_buffer | searchm_buffer_t |
typedef searchm_buffer * | p_searchm_buffer_t |
typedef searchm_cleanup_data | searchm_cleanup_data_t |
typedef searchm_cleanup_data * | p_searchm_cleanup_data_t |
Enumerations |
enum | searchm_state { searchm_state_notdef = 0,
searchm_state_off,
searchm_state_on
} |
| The state of an object. More...
|
enum | searchm_termtype {
tt_equal,
tt_quote,
tt_left,
tt_right,
tt_meta,
tt_term,
tt_none,
tt_and,
tt_or,
tt_not,
tt_null
} |
| The SwishParsedWords term type. More...
|
enum | searchm_tag_ids {
searchm_qpage = 0,
searchm_tag_ids_start = searchm_qpage,
searchm_qdisplay,
searchm_display,
searchm_qcmdstring,
searchm_reqid,
searchm_page,
searchm_header_names,
searchm_hv,
searchm_hits,
searchm_error,
searchm_pagenext,
searchm_pageprev,
searchm_hilitem_string,
searchm_parsed_words,
searchm_removed_words,
searchm_date,
searchm_subquery,
searchm_total_pages,
searchm_full_pages,
searchm_start,
searchm_end,
searchm_sort,
searchm_qconj,
searchm_qquery,
searchm_query,
searchm_qmetatag,
searchm_within,
searchm_qorder,
searchm_qsort,
searchm_qindex,
searchm_index,
searchm_last_page,
searchm_limit,
searchm_low_limit,
searchm_up_limit,
searchm_prop_limit,
searchm_cabsolute,
searchm_crelative,
searchm_cstrict,
searchm_cindexdir,
searchm_dbname,
searchm_dbdesc,
searchm_dbpointer,
searchm_dbadmin,
searchm_cbegin,
searchm_cresult,
searchm_cend,
searchm_cnohits,
searchm_invalid,
searchm_tag_ids_total = searchm_invalid
} |
| A list of searchm tags. searchm_invalid MUST be the last tag. searchm_tags_total is a convience item. searchm_tags_ids_start is a convience item. Some tags have an associated N value. Some tags have an associated string value. More...
|
enum | searchm_auto_tags {
searchm_auto_reccount = 0,
searchm_auto_tags_start = searchm_auto_reccount,
searchm_auto_title,
searchm_auto_rank,
searchm_auto_docpath,
searchm_auto_docsize,
searchm_auto_lastmodified,
searchm_auto_description,
searchm_auto_sdescription,
searchm_auto_dbfile,
searchm_auto_tags_total
} |
| Swish-e auto properties. More...
|
enum | searchm_itemlist {
searchm_itemlist_index = 0,
searchm_itemlist_start = searchm_itemlist_index,
searchm_itemlist_subquery,
searchm_itemlist_sortpair,
searchm_itemlist_total
} |
enum | searchm_limit_attr_type { searchm_limit_attr_type_date,
searchm_limit_attr_type_integer,
searchm_limit_attr_type_string
} |
enum | searchm_limit_attr {
searchm_limit_attr_name,
searchm_limit_attr_start = searchm_limit_attr_name,
searchm_limit_attr_active,
searchm_limit_attr_type,
searchm_limit_attr_hi,
searchm_limit_attr_low,
searchm_limit_attr_total
} |
| The limit TYPE. More...
|
Functions |
void * | searchm_per_server_config (apr_pool_t *p, server_rec *s) |
int | searchm_hook_post_config (apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) |
apr_status_t | searchm_pool_post_config_cleanup (void *data) |
void | searchm_hook_child_init (apr_pool_t *p, server_rec *s) |
apr_status_t | searchm_pool_child_init_cleanup (void *parm) |
void | searchm_process_init (int bSS, apr_pool_t *p) |
void | searchm_process_cleanup (int bSS, apr_pool_t *p) |
int | searchm_method_handler (request_rec *r) |
apr_status_t | searchm_get_querystring (p_query_info_t p_qi) |
apr_status_t | searchm_tags_cache_cmdline (p_query_info_t p_qi) |
apr_status_t | searchm_tags_cache_add (p_query_info_t p_qi, char *s, searchm_tag_ids_e tag_id, int bDel) |
searchm_tag_ids_e | searchm_tagid (char *t, int *p_rval, char **p_str) |
searchm_auto_tags_e | searchm_tagid_auto (char *tag) |
unsigned int | searchm_desc_trim_begin (const char *desc, unsigned int mpos, int *bStart) |
unsigned int | searchm_desc_trim_end (const char *desc, unsigned int mpos, int *bEnd) |
char * | searchm_description_handler (apr_pool_t *pool, apr_pool_t *ptemp, const char *desc, const char **stopword_list, const char **removed_list, p_searchm_termlist_t const p_tl) |
apr_status_t | searchm_replace_file (p_query_info_t p_qi, apr_file_t *fp) |
char * | searchm_replace_searchm_tag (p_query_info_t p_qi, searchm_tag_ids_e tag_id, int tval, char *p_str) |
int | searchm_parse_cmdline (p_query_info_t p_qi) |
apr_status_t | searchm_parse_cmdline_display (p_query_info_t p_qi, const char *p_value) |
apr_status_t | searchm_parse_cmdline_page (p_query_info_t p_qi, const char *p_value) |
apr_status_t | searchm_parse_cmdline_reqid (p_query_info_t p_qi, const char *p_value) |
apr_status_t | searchm_process_requestinfo (p_query_info_t p_qi) |
apr_status_t | searchm_parse_cmdline_within (p_query_info_t p_qi, const char *p_value) |
apr_status_t | searchm_parse_cmdline_index (p_query_info_t p_qi, const char *p_value, int nval) |
apr_status_t | searchm_parse_cmdline_conj (p_query_info_t p_qi, const char *p_value, int nval) |
apr_status_t | searchm_parse_cmdline_query (p_query_info_t p_qi, const char *p_value, int nval) |
apr_status_t | searchm_parse_cmdline_metatag (p_query_info_t p_qi, const char *p_value, int nval) |
apr_status_t | searchm_parse_cmdline_order (p_query_info_t p_qi, const char *p_value, int nval) |
apr_status_t | searchm_parse_cmdline_sort (p_query_info_t p_qi, const char *p_value, int nval) |
apr_status_t | searchm_parse_cmdline_limit (p_query_info_t p_qi, const char *value, int n, searchm_limit_attr_e ltype, int lstype) |
int | searchm_limit_process_date (const char *const ld[SEARCHM_LIMIT_MAX_SUB], apr_time_t *t) |
int | searchm_limit_process_string (const char *const ld[SEARCHM_LIMIT_MAX_SUB], char **str, apr_pool_t *p) |
int | searchm_limit_process_integer (const char *const ld[SEARCHM_LIMIT_MAX_SUB], char **str, apr_pool_t *p) |
int | searchm_limit_process (p_query_info_t p_qi) |
int | searchm_create_filepath (p_query_info_t p_qi) |
int | searchm_cmp_weighted (char *p, char *t, int *v) |
int | searchm_cmp_stringed (char *p, char *t, char **p_str) |
int | searchm_cmp_limit (const char *param, int *n, p_searchm_limit_attr_e ltype, int *lstype, apr_pool_t *p) |
apr_status_t | searchm_itemlist_add (p_query_info_t p_qi, void *list, void *item, searchm_itemlist_e listtype, searchm_tag_ids_e itemtype) |
apr_status_t | searchm_pre_query (p_query_info_t p_qi) |
apr_status_t | searchm_create_within (p_query_info_t p_qi) |
int | searchm_structure_to_id (char *p_value) |
int | searchm_error_to_api (int i) |
const char * | searchm_set_absolute (cmd_parms *parms, void *dummy, const int arg) |
const char * | searchm_set_relative (cmd_parms *parms, void *dummy, const int arg) |
const char * | searchm_set_strict (cmd_parms *parms, void *dummy, const int arg) |
const char * | searchm_set_indexdir (cmd_parms *parms, void *dummy, const char *arg) |
const char * | searchm_set_lockfile (cmd_parms *parms, void *dummy, const char *arg) |
const char * | searchm_set_begin (cmd_parms *parms, void *dummy, const char *arg) |
const char * | searchm_set_result (cmd_parms *parms, void *dummy, const char *arg) |
const char * | searchm_set_end (cmd_parms *parms, void *dummy, const char *arg) |
const char * | searchm_set_nohits (cmd_parms *parms, void *dummy, const char *arg) |
const char * | searchm_set_activate (cmd_parms *parms, void *dummy, int bool) |
void * | searchm_per_dir_config (apr_pool_t *p, char *dir) |
apr_status_t | searchm_qi_setup (p_query_info_t p_qi, request_rec *r, p_searchm_config_t p_sc, p_searchm_dir_config_t p_sdc) |
int | searchm_metalist_process (p_query_info_t p_qi) |
apr_status_t | searchm_subquery_process (p_searchm_metalist_t const p_ml, const char **sl, unsigned int *index_sl, const char *meta_def, apr_pool_t *p) |
searchm_termtype_e | searchm_gettermtype (const char *t) |
searchm_termtype_e | searchm_conjtype (const char *const t) |
apr_status_t | searchm_addterm (p_searchm_metalist_t p_ml, const char **sl, int *index_sl, const char *m, int bP, int nterms, apr_pool_t *p) |
apr_status_t | searchm_metalist_add (p_searchm_metalist_t const p_ml, const char *mn, p_searchm_metaelem_t *pp_me, apr_pool_t *p) |
p_searchm_metaelem_t | searchm_metalist_get (p_searchm_metalist_t p_ml, const char *mn, int *bFound) |
apr_status_t | searchm_nodelist_add (p_searchm_metaelem_t const p_me, const char **sl, int *index_sl, int bP, int nterms, apr_pool_t *p) |
void | searchm_metalist_destroy (p_searchm_metalist_t const p_ml) |
int | searchm_nullstrcmp (const char *const t1, const char *const t2, const int bCase) |
apr_status_t | searchm_nodelist_match (p_searchm_metaelem_t const me, const char **sl, const int index_sl, const int bP, const int nterms, int *bResult, apr_pool_t *p) |
apr_status_t | searchm_phrase_match (p_searchm_metaelem_t const me, const char **sl, const int index_sl, const int bP, const int nterms, int *bResult, apr_pool_t *p) |
apr_status_t | searchm_single_match (const char *t1, const char *t2, const int bWay, int *Result, apr_pool_t *p) |
apr_status_t | searchm_termlist_create (p_searchm_metalist_t const p_ml, const char *mn, int bUseNull, p_searchm_termlist_t const p_tl, int *bResult, apr_pool_t *p) |
void | searchm_termlist_destroy (p_searchm_termlist_t const p_tl, apr_pool_t *p) |
int | searchm_nextmatch (p_searchm_termlist_t const p_tl, const char *desc, unsigned int *pos, int *i_match, unsigned int *mpos_b) |
apr_status_t | searchm_cookie_process (p_query_info_t p_qi) |
apr_status_t | searchm_swishexecute (p_query_info_t p_qi) |
apr_status_t | searchm_phases (p_query_info_t p_qi) |
apr_status_t | searchm_phases_nohits (p_query_info_t p_qi) |
void | searchm_error_doc (p_query_info_t p_qi) |
void | searchm_test (p_query_info_t p_qi) |
apr_status_t | searchm_generate_reqid (p_query_info_t p_qi) |
apr_status_t | searchm_packet_make (p_query_info_t p_qi, void **pkt, unsigned int *psize) |
apr_status_t | searchm_next_string (char **s, void *v, unsigned int *pos, apr_pool_t *p) |
apr_status_t | searchm_packet_split (p_query_info_t p_qi, void *pkt, unsigned int psize) |
apr_status_t | searchm_buffer_expand (p_searchm_buffer_t pb, unsigned int min, apr_pool_t *p) |
apr_status_t | searchm_buffer_add_string (const char *s, p_searchm_buffer_t pb, apr_pool_t *p) |
apr_status_t | searchm_buffer_add (void *pv, unsigned int size, p_searchm_buffer_t pb, apr_pool_t *p) |
int | searchm_absolute_path (const char *path) |
int | searchm_check_filename (const char *file) |
int | searchm_strcmp (const char *s1, const char *s2) |
apr_status_t | searchm_dbase_open (p_query_info_t p_qi) |
apr_status_t | searchm_dbase_close (p_query_info_t p_qi) |
apr_status_t | searchm_dbase_get (p_query_info_t p_qi) |
apr_status_t | searchm_dbase_put (p_query_info_t p_qi) |
apr_status_t | searchm_dbase_purge (p_query_info_t p_qi) |
Variables |
apr_global_mutex_t * | searchm_global_lock = NULL |