relevanssi_date_query_filter

apply_filters( 'relevanssi_date_query_filter', string $query_restrictions, WP_Date_Query $date_query )

This filter hook filters the date query MySQL.

Parameters

$query_restrictions
(string) The MySQL query restrictions.

$date_query
(WP_Date_query) A date query object for the date restrictions.

More information

When Relevanssi processes query variables, it converts them to MySQL query restrictions. This filter hook lets you modify the MySQL query for date query parameters.

Relevanssi gets the query SQL from WP_Date_Query->get_sql() and it’s then wrapped in “ AND relevanssi.doc IN ( SELECT DISTINCT(ID) FROM $wpdb->posts WHERE 1 $query )“. (This WHERE 1 is because the get_sql() query begins with AND...)