SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.9

searchwp_indexer_apply_engines_rules

View Parameters »

Note: Use of this hook will require a manual reindex

A goal of SearchWP is to keep the index as small as possible. One way of doing that is to have the indexer obey the rules as outlined by your search engine(s). As the indexer runs it will evaluate your entries to ensure they can potentially be included in any search results. If an entry cannot be included in results due to your engine configuration (e.g. excluded by taxonomy) the entry will not be indexed.

You can tell SearchWP to ignore the engine settings when indexing and instead index all enabled post types with this hook. To make that change you can add the following to your theme’s functions.php:

<?php
// Tell SearchWP to ignore limiters/exclusions as defined in engine settings when indexing
// Note: this will very likely cause your index to grow in size
add_filter( 'searchwp_indexer_apply_engines_rules', '__return_false' );
view raw functions.php hosted with ❤ by GitHub

Note:: you will need to rebuild your index by clicking the Reset Index button on the Advanced tab of the SearchWP settings screen if you use this hook.

Parameters

Parameter Type Description
$apply_rules Boolean

Whether to apply engine rules when indexing

[wpforms id="3080"]