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


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 1.0


View Parameters »

SearchWP’s indexer tries to run as fast as it can. In some environments (depending on configuration) the indexer may be faced with an issue known as INSERT Deadlock. This means that the database tables are locked when SearchWP is attempting to index a post. SearchWP will attempt to wait out the deadlock by default 5 times, pausing for a second between each attempt. If you would like to adjust how many retries the indexer executes during an INSERT Deadlock, you can use this hook like so:

// only try to recover from INSERT Deadlock 3 times
function my_searchwp_indexer_max_attempts( $number_of_attempts ) {
return 3;
add_filter( 'searchwp_indexer_max_attempts', 'my_searchwp_indexer_max_attempts' );
view raw gistfile1.php hosted with ❤ by GitHub


Parameter Type Description
$number_of_attempts Integer

How many attempts the indexer should make when faced with an INSERT Deadlock

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