Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

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:

2016-12-26-at-10-26-am

If you prefer a code-based approach, add the following to your theme’s functions.php:

<?php
add_filter( 'searchwp_alternate_indexer', '__return_true' );
view raw gistfile1.php hosted with ❤ by GitHub

Building the initial index

With the alternative indexer added, you will see a new trigger on the main SearchWP settings screen:

Screen Shot 2015-03-18 at 9.03.32 AM

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.

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP