Skip to content

Instantly share code, notes, and snippets.

Created April 15, 2014 12:53
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Throttle the SearchWP indexer
// pause the indexer for 1s in between passes
function my_searchwp_indexer_throttle() {
return 1;
add_filter( 'searchwp_indexer_throttle', 'my_searchwp_indexer_throttle' );
// only process 3 posts per indexer pass (instead of the default of 10)
function my_searchwp_index_chunk_size() {
return 3;
add_filter( 'searchwp_index_chunk_size', 'my_searchwp_index_chunk_size' );
// only process 200 terms at a time
function my_searchwp_process_term_limit() {
return 200;
add_filter( 'searchwp_process_term_limit', 'my_searchwp_process_term_limit' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment