Note: You are viewing the documentation for Version 4View Version 3 Docs


\SearchWP\Indexer facilitates the indexing process of SearchWP. SearchWP’s indexer works alongside hooks set up in \SearchWP\Sources to automatically keep the search Index up to date.

Basic Usage

If you are working with site customizations that do not align with the delta update hooks set up in \SearchWP\Sources you may want to force an Index update. This can be done like so:

// Forcefully trigger SearchWP's Indexer.
$indexer = new \SearchWP\Indexer();
view raw functions.php hosted with ❤ by GitHub

When the \SearchWP\Indexer is triggered, any necessary delta updates will be queued and applied as though they were triggered by native hooks.


There are no arguments when instantiating a new \SearchWP\Indexer.


There are no public properties in \SearchWP\Indexer.


When working with \SearchWP\Indexer there are a number of methods to consider.

Pause the indexing process.
Unpause the indexing process.


There are a number of hooks available to further modify the behavior of \SearchWP\Indexer:

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP