Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Throttle the SearchWP indexer
<?php
// 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
You can’t perform that action at this time.