\SearchWP\Index\Controller
Note: SearchWP’s Index was designed in such a way that all operations are handled internally without outside intervention.
Use of this class should be avoided unless directly guided by Support.
Table of Contents
\SearchWP\Index\Controller performs direct operations on the search Index. It is also responsible for maintaining delta update operations.
Arguments
There are no arguments when instantiating a new \SearchWP\Index\Controller.
Properties
There are no public properties in \SearchWP\Index\Controller.
Methods
When working with \SearchWP\Index\Controller there are a number of methods to consider.
reset( $all_sites = false )- Reset the Index by dropping all queues and data.
$all_sitesWhether to reset all sites. (default:falseonly current site)get_alias- Getter for Index alias to use in SQL queries.
get_tables- Getter for Index tables.
get_sources- Getter for all registered
\SearchWP\Sources. get_default_sources- Getter for default
\SearchWP\Sources. get_source_by_name( string $name )- Getter for registered
\SearchWP\Source. $nameSource name. (required)get_entry_status( Entry $entry )- Getter for
\SearchWP\Entrystatus. $entryEntry to check.get_source_id_status( string $source, $id )- Getter for
\SearchWP\Sourcestatus by ID. $sourceSource name.$idSource entry ID (required).trigger- Trigger the delta update process.
add ( Entry $entry )- Add an
\SearchWP\Entryto the Index. drop( Source $source, $id, $force = false )- Drops an
\SearchWP\Entryfrom the Index. $sourceSource.$idID of the Entry to drop.$forceWhether to drop immediately as opposed to allowing the background process to perform the task.get_stats- Retrieve the stats for the Index right now.
get_tokens_for_entry( Entry $entry )- Retrieve the tokens for a single
\SearchWP\Entry.
Hooks
There are a number of hooks available to further modify the behavior of \SearchWP\Index\Controller:

