Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

searchm_description_handler

The searchm_description_handler associated information. More...

Defines

#define SEARCHM_DESCRIPTION_PRE   24
 The number of characters before the matched term.

#define SEARCHM_DESCRIPTION_POST   24
 The number of characters after the matched term.

#define SEARCHM_DESCRIPTION_MAX   512
 The maximum number of characters to be in the returned searchm_description tag. Not an absolute value. Searching stops when p_ret becomes greater than this value.

#define SEARCHM_SEARCH_SUBS   2
 The number of subs in the RE. RE will always contain one SUB.

#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.


Functions

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)
 create replacement string. p_tl may be a null list.

int searchm_nextmatch (p_searchm_termlist_t const p_tl, const char *desc, unsigned int *pos, int *i_match, unsigned int *mpos_b)

Detailed Description

The searchm_description_handler associated information.


Define Documentation

#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_DESCRIPTION_MAX   512
 

The maximum number of characters to be in the returned searchm_description tag. Not an absolute value. Searching stops when p_ret becomes greater than this value.

#define SEARCHM_DESCRIPTION_POST   24
 

The number of characters after the matched term.

#define SEARCHM_DESCRIPTION_PRE   24
 

The number of characters before the matched term.

#define SEARCHM_SEARCH_SUBS   2
 

The number of subs in the RE. RE will always contain one SUB.


Function Documentation

searchm_desc_trim_begin const char *  desc,
unsigned int  mpos,
int *  bStart
[static]
 

Parameters:
desc The entire string.
mpos The beginning of the match position
bStart OUT:If the trim is at the start of desc.
Returns:
The beginning trim position

mpos if all break characters. If all characters in the trim range are breaks or all characters in the trim range are not breaks, then cut at beginning of trim range. If beginning of trim range extends beyond start of string, return start of string. Otherwise, return the position of the first character of the first word at the beginning of the trim range.

searchm_desc_trim_end const char *  desc,
unsigned int  mpos,
int *  bEnd
[static]
 

Parameters:
desc The entire string.
mpos The first char after the matching term.
bEnd OUT: If the trim is at the end of desc.
Returns:
The end trim position; Always a break character. If range of characters witin trim are all breaks or all characters then just return the end of the range. If the trim extends beyond the end of the string, return the end of the string. Otherwise, return the position of the first break of the last word in trim range. If the last character of the range is not a break, ignore next character.

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
[static]
 

create replacement string. p_tl may be a null list.

Parameters:
pool The request memory pool
ptemp A temporary pool. Valid only while processing this result item.
desc The swishdescription field
stopword_list The SwishParsedWords results. Allocated from temp pool.
removed_list The SwishRemovedStopwords results. Allocated from Swish-e
p_tl The terms list for swishdefault and/or NULL metaname terms.

Returns:
The string to use as a replacement. ASCII only. TEST...

searchm_nextmatch p_searchm_termlist_t const  p_tl,
const char *  desc,
unsigned int *  pos,
int *  i_match,
unsigned int *  mpos_b
[static]
 

Parameters:
p_tl The termitem list
desc The complete string to search.
pos IN: The search start position. OUT: The first position after matched term.
i_match OUT: The index into tlist of the term that matched.
mpos_b OUT: The position of the first character of the matched term.
Returns:
1 found match

0 no more matches, done


Generated on Wed Mar 30 09:40:29 2005 for Mod_Searchm by doxygen 1.3.6