relevanssi_index_excerpt

apply_filters( 'relevanssi_index_excerpt', bool $index, WP_Post $post_object )

Controls whether post excerpt is indexed or not.

Parameters

$index
(bool) If true, index post content. Default true.

$post_object
(WP_Post) The post object.

More information

If you want to control which posts have their excerpts indexed, you can use this filter hook to set that on a per-post basis.

For example, to index excerpts for all posts types except “post”, you can do this:

add_filter( 'relevanssi_index_excerpt', function( $index, $post_object ) {
	if ( 'post' === $post_object->post_type ) {
        $index = false;
    }
    return $index;
}, 10, 2 );