SearchWP

This Documentation is for SearchWP Version 3

Available since: 3.0

searchwp_stopwords_suggestions_threshold

View Parameters »

When retrieving stopword suggestions SearchWP will scan your entire index to find terms that appear consistently across your entire website. To do this, SearchWP implements a threshold of overall entries a word appears in before it is considered a stopword suggestion. You can control that threshold using this hook:

<?php
// Tell SearchWP to suggest stopwords only if they appear in 50% of entries.
add_filter( 'searchwp_stopwords_suggestions_threshold', function( $threshold ) {
return 0.5;
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$threshold Float

Percentage (between 0 and 1) of entries a word must appear in before it is considered a stopword suggestion. Default is 0.3.

[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]