Available since: 1.0.5
searchwp_index_chunk_size
Note: Use of this hook will have an effect on performance
Depending on how performant your server is, you can modify how many posts are indexed at once using this filter. The more posts indexed per pass, the more aggressively the indexer will run.
Note: If you set this value too high you may experience indexer timeouts.
Example: To increase the number of posts SearchWP attempts to index at each pass, add the following to your active theme’s functions.php
:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_searchwp_index_chunk_size() { | |
// index 15 posts at a time instead of the default 10 | |
return 15; | |
} | |
add_filter( 'searchwp_index_chunk_size', 'my_searchwp_index_chunk_size' ); |