Available since: 2.8
searchwp_term_count_limit
View Parameters »If you’re noticing SearchWP struggle to index long or big entries on your site, you can use theĀ searchwp_term_count_limit
filter to adjust how SearchWP processes content when indexing.
When SearchWP considers something to be “big data” it will take a revised (but slower) approach to indexing that content so as to not overrun server resources. The default for this threshold is 10,000 characters.
You can customize this threshold by adding something like this to your 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 | |
// Tell SearchWP to take a more reserved (slower) approach when indexing | |
// Applicable for servers with limited resources | |
// Default $threshold is 10000 | |
add_filter( 'searchwp_term_count_limit', function( $threshold ) { | |
return 5000; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$threshold |
Integer |
The number of characters to trigger alternative data handling when indexing |