apply_filters( 'relevanssi_indexing_limit', int $limit )

Filters the initial number of posts to index at one go.


(int) The number of posts Relevanssi indexes at once, default 10.

More information

When Relevanssi indexes posts, it starts with 10 posts at once. The limit is then modified depending on how fast the indexing moves along: if the posts were indexed in less than 2 seconds, the limit is doubled. If the indexing took under 5 seconds, the limit is increased by 5. On the other hand, if the indexing takes more than 10 seconds, the limit is reduced by 5 and if it took more than 20 seconds, the limit is halved.

You can use this filter hook to adjust the initial number:

add_filter( 'relevanssi_indexing_limit', function() { return 5; } );

In general if you need to adjust this, you probably want to disable the adjustment altogether to keep the number of posts indexed stable. You can do that with the relevanssi_indexing_adjust filter hook.