apply_filters( 'relevanssi_phrase', string $phrase )
Filters each phrase before it’s passed through
esc_sql() and added in the MySQL query. Before this filter runs, all quotes and apostrophes in the phrase have already been replaced by MySQL wild cards (
_) and the phrase has been put through
(string) The phrase.
This filter hook is mostly useful in the case where your database stores accented letters as entities instead of just plain characters. If that’s the case, looking for a phrase
"vihreä härpäke" won’t work, as Relevanssi is looking for
vihreä härpäke, but your database has
This can be fixed by modifying the phrase with this filter hook:
add_filter( 'relevanssi_phrase', 'htmlentities' );
Now the phrase is transformed into
vihreä härpäke so that it matches what is in your database and Relevanssi can make the match.