base
abstract class base implements search_backend_interface
optional base class for search plugins providing simple caching based on ACM and functions to retrieve ignore_words and synonyms
Constants
SEARCH_RESULT_NOT_IN_CACHE |
|
SEARCH_RESULT_IN_CACHE |
|
SEARCH_RESULT_INCOMPLETE |
|
private BATCH_SIZE |
|
Properties
protected service | $cache | ||
protected config | $config | ||
protected driver_interface | $db | ||
protected user | $user | ||
protected string | $search_results_table |
Methods
Constructor.
Retrieves cached search results
Caches post/topic ids
Removes old entries from the search results table and removes searches with keywords that contain a word in $words.
Create fulltext index
Drop fulltext index
Return the ids of the forums that have indexing enabled
Get batch of posts after id
Get post with higher id
Gets backend class
Details
at line 68
__construct(service $cache, config $config, driver_interface $db, user $user, string $search_results_table)
Constructor.
at line 89
protected int
obtain_ids(string $search_key, int $result_count, array $id_ary, int $start, int $per_page, string $sort_dir)
Retrieves cached search results
at line 156
protected void
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
at line 266
protected void
destroy_cache(array $words, array|bool $authors = false)
Removes old entries from the search results table and removes searches with keywords that contain a word in $words.
at line 319
array|null
create_index(int $post_counter = 0)
Create fulltext index
at line 380
array|null
delete_index(int $post_counter = null)
Drop fulltext index
at line 433
protected array
forum_ids_with_indexing_enabled()
Return the ids of the forums that have indexing enabled
at line 459
protected Generator
get_posts_batch_after(int $post_id)
Get batch of posts after id
at line 478
protected int
get_max_post_id()
Get post with higher id
at line 492
string
get_type()
Gets backend class