class fulltext_mysql extends base
Fulltext search for MySQL
Properties
$ignore_words | ||
$match_synonym | ||
$replace_synonym |
Methods
search_backend($error)
|
from base | |
int |
obtain_ids(string $search_key, int $result_count, array $id_ary, int $start, int $per_page, string $sort_dir)
Retrieves cached search results |
from base |
null |
save_ids(string $search_key, string $keywords, array $author_ary, int $result_count, array $id_ary, int $start, string $sort_dir)
Caches post/topic ids |
from base |
destroy_cache($words, $authors = false)
Removes old entries from the search results table and removes searches with keywords that contain a word in $words. |
from base | |
__construct(string|bool $error, string $phpbb_root_path, string $phpEx, auth $auth, config $config, driver_interface $db, user $user, dispatcher_interface $phpbb_dispatcher)
Constructor Creates a new \phpbb\search\fulltext_mysql, which is used as a search backend |
||
string |
get_name()
Returns the name of this search backend to be displayed to administrators |
|
string |
get_search_query()
Returns the search_query |
|
array |
get_common_words()
Returns the common_words array |
|
array |
get_word_length()
Returns the word_length array |
|
string|bool |
init()
Checks for correct MySQL version and stores min/max word length in the config |
|
bool |
split_keywords(string $keywords, string $terms)
Splits keywords entered by a user into an array of words stored in $this->splitwords Stores the tidied search query in $this->searchquery |
|
split_message(string $text)
Turns text into an array of words |
||
keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, $id_ary, $start, $per_page)
Performs a search on keywords depending on display specific params. |
||
author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, $id_ary, $start, $per_page)
Performs a search on an author's posts without caring about message contents. |
||
index($mode, $post_id, $message, $subject, $poster_id, $forum_id)
Destroys cached search results, that contained one of the new words in a post so the results won't be outdated |
||
index_remove($post_ids, $author_ids, $forum_ids)
Destroy cached results, that might be outdated after deleting a post |
||
tidy()
Destroy old cache entries |
||
string|bool |
create_index($acp_module, $u_action)
Create fulltext index |
|
string|bool |
delete_index($acp_module, $u_action)
Drop fulltext index |
|
index_created()
Returns true if both FULLTEXT indexes exist |
||
index_stats()
Returns an associative array containing information about the indexes |
||
associative |
acp()
Display a note, that UTF-8 support is not available with certain versions of PHP |
Details
in base at line 33
public
search_backend($error)
in base at line 51
public int
obtain_ids(string $search_key, int $result_count, array $id_ary, int $start, int $per_page, string $sort_dir)
Retrieves cached search results
in base at line 132
public null
save_ids(string $search_key, string $keywords, array $author_ary, int $result_count, array $id_ary, int $start, string $sort_dir)
Caches post/topic ids
in base at line 241
public
destroy_cache($words, $authors = false)
Removes old entries from the search results table and removes searches with keywords that contain a word in $words.
at line 90
public
__construct(string|bool $error, string $phpbb_root_path, string $phpEx, auth $auth, config $config, driver_interface $db, user $user, dispatcher_interface $phpbb_dispatcher)
Constructor Creates a new \phpbb\search\fulltext_mysql, which is used as a search backend
at line 115
public string
get_name()
Returns the name of this search backend to be displayed to administrators
at line 125
public string
get_search_query()
Returns the search_query
at line 135
public array
get_common_words()
Returns the common_words array
at line 145
public array
get_word_length()
Returns the word_length array
at line 155
public string|bool
init()
Checks for correct MySQL version and stores min/max word length in the config
at line 224
public bool
split_keywords(string $keywords, string $terms)
Splits keywords entered by a user into an array of words stored in $this->splitwords Stores the tidied search query in $this->searchquery
at line 363
public
split_message(string $text)
Turns text into an array of words
at line 405
public
keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, $id_ary, $start, $per_page)
Performs a search on keywords depending on display specific params.
You have to run split_keywords() first
at line 669
public
author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, $id_ary, $start, $per_page)
Performs a search on an author's posts without caring about message contents.
Depends on display specific params
at line 922
public
index($mode, $post_id, $message, $subject, $poster_id, $forum_id)
Destroys cached search results, that contained one of the new words in a post so the results won't be outdated
at line 970
public
index_remove($post_ids, $author_ids, $forum_ids)
Destroy cached results, that might be outdated after deleting a post
at line 978
public
tidy()
Destroy old cache entries
at line 991
public string|bool
create_index($acp_module, $u_action)
Create fulltext index
at line 1080
public string|bool
delete_index($acp_module, $u_action)
Drop fulltext index
at line 1146
public
index_created()
Returns true if both FULLTEXT indexes exist
at line 1159
public
index_stats()
Returns an associative array containing information about the indexes
at line 1217
public associative
acp()
Display a note, that UTF-8 support is not available with certain versions of PHP