[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Base class for search engines. All search engines must extend this class.
Copyright: | 2015 Daniel Neis |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 387 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct() X-Ref |
Initialises the search engine configuration. Search engine availability should be checked separately. return: void |
get_course($courseid) X-Ref |
Returns a course instance checking internal caching. param: int $courseid return: stdClass |
get_user($userid) X-Ref |
Returns user data checking the internal static cache. Including here the minimum required user information as this may grow big. param: int $userid return: stdClass |
get_search_area($areaid) X-Ref |
Returns a search instance of the specified area checking internal caching. param: string $areaid Area id return: \core_search\base |
to_document(\core_search\base $searcharea, $docdata) X-Ref |
Returns a document instance prepared to be rendered. param: \core_search\base $searcharea param: array $docdata return: \core_search\document |
get_plugin_name() X-Ref |
Returns the plugin name. return: string Frankenstyle plugin name. |
get_document_classname() X-Ref |
Gets the document class used by this search engine. Search engines can overwrite \core_search\document with \search_ENGINENAME\document class. Looks for a document class in the current search engine namespace, falling back to \core_search\document. Publicly available because search areas do not have access to the engine details, \core_search\document_factory accesses this function. return: string |
index_starting($fullindex = false) X-Ref |
Run any pre-indexing operations. Should be overwritten if the search engine needs to do any pre index preparation. param: bool $fullindex True if a full index will be performed return: void |
index_complete($numdocs = 0, $fullindex = false) X-Ref |
Run any post indexing operations. Should be overwritten if the search engine needs to do any post index cleanup. param: int $numdocs The number of documents that were added to the index param: bool $fullindex True if a full index was performed return: void |
area_index_starting($searcharea, $fullindex = false) X-Ref |
Do anything that may need to be done before an area is indexed. param: \core_search\base $searcharea The search area that was complete param: bool $fullindex True if a full index is being performed return: void |
area_index_complete($searcharea, $numdocs = 0, $fullindex = false) X-Ref |
Do any area cleanup needed, and do anything to confirm contents. Return false to prevent the search area completed time and stats from being updated. param: \core_search\base $searcharea The search area that was complete param: int $numdocs The number of documents that were added to the index param: bool $fullindex True if a full index is being performed return: bool True means that data is considered indexed |
optimize() X-Ref |
Optimizes the search engine. Should be overwritten if the search engine can optimize its contents. return: void |
is_installed() X-Ref |
Does the system satisfy all the requirements. Should be overwritten if the search engine has any system dependencies that needs to be checked. return: bool |
get_query_error() X-Ref |
Returns any error reported by the search engine when executing the provided query. It should be called from static::execute_query when an exception is triggered. return: string |
file_indexing_enabled() X-Ref |
Return true if file indexing is supported and enabled. False otherwise. return: bool |
clear_query_error() X-Ref |
Clears the current query error value. return: void |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |