phpBB3


search\search_backend
includes/search/search.php at line 32

Class search_backend

search_backend
All Known Subclasses:
fulltext_mysql fulltext_native

public class search_backend

search_backend optional base class for search plugins providing simple caching based on ACM and functions to retrieve ignore_words and synonyms


Field Summary
mixed

$ignore_words

mixed

$match_synonym

mixed

$replace_synonym

Constructor Summary
void

__construct(mixed error)

Method Summary
void

get_ignore_words()

Retrieves a language dependend list of words that should be ignored by the search

void

get_synonyms()

Stores a list of synonyms that should be replaced in $this->match_synonym and $this->replace_synonym and caches them

int

obtain_ids(int &$result_count, array &$id_ary, mixed search_key, mixed result_count, mixed id_ary, mixed start, mixed per_page, mixed sort_dir)

Retrieves cached search results

void

save_ids(array &$id_ary, mixed search_key, mixed keywords, mixed author_ary, mixed result_count, mixed id_ary, mixed start, mixed sort_dir)

Caches post/topic ids

void

destroy_cache(mixed words, bool authors)

Removes old entries from the search results table and removes searches with keywords that contain a word in $words.

Field Detail

includes/search/search.php at line 34

ignore_words

public mixed $ignore_words = array()

includes/search/search.php at line 35

match_synonym

public mixed $match_synonym = array()

includes/search/search.php at line 36

replace_synonym

public mixed $replace_synonym = array()

Constructor Detail

includes/search/search.php at line 38

__construct

public void __construct(mixed error)

Method Detail

includes/search/search.php at line 47

get_ignore_words

public void get_ignore_words()

Retrieves a language dependend list of words that should be ignored by the search


includes/search/search.php at line 69

get_synonyms

public void get_synonyms()

Stores a list of synonyms that should be replaced in $this->match_synonym and $this->replace_synonym and caches them


includes/search/search.php at line 98

obtain_ids

public int obtain_ids(int &$result_count, array &$id_ary, mixed search_key, mixed result_count, mixed id_ary, mixed start, mixed per_page, mixed sort_dir)

Retrieves cached search results

Parameters:
&$result_count - will contain the number of all results for the search (not only for the current page)
&$id_ary - is filled with the ids belonging to the requested page that are stored in the cache
Returns:
SEARCH_RESULT_NOT_IN_CACHE or SEARCH_RESULT_IN_CACHE or SEARCH_RESULT_INCOMPLETE

includes/search/search.php at line 158

save_ids

public void save_ids(array &$id_ary, mixed search_key, mixed keywords, mixed author_ary, mixed result_count, mixed id_ary, mixed start, mixed sort_dir)

Caches post/topic ids

Parameters:
&$id_ary - contains a list of post or topic ids that shall be cached, the first element must have the absolute index $start in the result set.

includes/search/search.php at line 267

destroy_cache

public void destroy_cache(mixed words, bool authors)

Removes old entries from the search results table and removes searches with keywords that contain a word in $words.


phpBB3