searchwp\index\tokens_max
Since: 4.0.0
Table of Contents
By default SearchWP will generate tokens in batches of 500 maximum. If you feel your server is capable of doing more than that, increasing this limit may improve performance of the indexing process.
This hook can also be used to reduce the number of tokens generated per patch in case you are having trouble with the indexing process.
Parameters
Type | Parameter | Default | Since |
---|---|---|---|
Integer | $limit |
500 |
4.0.0 |
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Reduce the batch size for token generation
To reduce (scale back) the generation of tokens during indexing
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 | |
// Reduce SearchWP's batch size for token generation. | |
add_filter( 'searchwp\index\tokens_max', function( $limit ) { | |
return 200; | |
} ); |