apply_filters( 'relevanssi_excerpt_custom_fields', array $custom_fields, int $post_id )
This filter hook filters the list of custom fields used for generating the excerpt.
(array) An array of custom field names.
(int) The post ID.
By default, Relevanssi uses the same custom fields for excerpts that it uses for indexing. This list can be filtered with
relevanssi_index_custom_fields. However, if you want a custom field to be included in the index but not used for excerpts, there hasn’t been an easy method to exclude custom fields from excerpts.
This filter hook does that: it presents you with an array of custom field names. These fields are looped through, and the values are collected, passing them through
relevanssi_custom_field_value (which also applies to indexing).