Available since: 1.4
searchwp_auto_reindex
SearchWP automatically triggers an index update when content is edited. If you would like to prevent that from happening you can use this filter.
The difference between this hook and searchwp_background_deltas
is that this hook simply prevents the reindexing of posts, they are still purged from the index. When using searchwp_background_deltas
posts are not purged nor reindexed.
Example: To prevent SearchWP from automatically reindexing edited posts, 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 | |
// prevent SearchWP from automatically maintaining it's index | |
add_filter( 'searchwp_auto_reindex', '__return_false' ); |