do_action( 'relevanssi_pre_indexing_query' )

This action hook triggers before Relevanssi runs the indexing query.

More information

The indexing query is large and can sometimes be bigger than the server MAX_JOIN_SIZE. If that’s the case and preventing Relevanssi from indexing posts, you can use this action hook to fix the problem.

add_action( 'relevanssi_pre_indexing_query', function() {
  global $wpdb;
  $wpdb->query( 'SET OPTION SQL_BIG_SELECTS=1' );

For more information, see MySQL documentation for sql_big_selects.