relevanssi_pdf_for_parent_query

apply_filters( 'relevanssi_pdf_for_parent_query', string $query, int $post_id )

Filters the MySQL query used to fetch the attachment content for the posts attached to this parent post.

Parameters

$query
(string) The MySQL query.

$post_id
(int) The parent post ID.

More information

When Relevanssi indexes the attachment content for the parent post, the attached content is read for each parent post with this MySQL query:

SELECT meta_value FROM wp_postmeta AS pm, wp_posts AS p
  WHERE pm.post_id = p.ID
  AND p.post_parent = {post_id}
  AND meta_key = '_relevanssi_pdf_content'

This query passes through this filter hook. Modifying this query will be necessary if you want to read contents from attachments that are not connected to parent posts with the post_parent linkage – though it may be easier to just read in the contents in a relevanssi_content_to_index filter function.