Available since: 1.3.2
searchwp_and_logic
When SearchWP performs a search it takes a first pass at the index using AND
logic if multiple terms are present. It often reduces the potential results pool generating more limited (but more relevant) results. If no results are found during the AND
pass, SearchWP will take another pass at the index using OR
logic, which is more resource intensive and includes a larger pool of results.
If you would like to skip the AND
pass you can use this filter to do so.
Example: To have SearchWP skip checking for AND
results, 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 | |
add_filter( 'searchwp_and_logic', '__return_false' ); |