Available since: 2.5
searchwp_alternate_indexer
If SearchWP’s background indexer is giving you trouble, you can optionally enable a browser-based alternative indexer. To enable the alternative indexer, tick the checkbox on the Advanced tab of the SearchWP settings screen:
If you prefer a code-based approach, add the following to your theme’s functions.php:
<?php | |
add_filter( 'searchwp_alternate_indexer', '__return_true' ); |
Building the initial index
With the alternative indexer added, you will see a new trigger on the main SearchWP settings screen:
You can initialize an index by clicking the Trigger Indexer button, but you must leave the browser window open until it finishes. This only applies for building the initial index.
Delta index updates (updating the index when edits are made)
With the alternate indexer enabled, SearchWP will continue to apply delta updates to the index as content is added/removed/edited. The difference here is that this process takes place as the content is being saved (as opposed to happening as a background process after the content has been saved) — you do not need to trigger the indexer manually.
The alternate indexer is built on top of the standard indexer, once the initial index has been built the alternate indexer is just as much “set it and forget it” as the standard indexer is.