Yes. The easiest solution is to just convert all cases of “ı” to “i” automatically:
add_filter( 'relevanssi_punctuation_filter', 'rlv_i' );
function rlv_i( $array ) {
$array['ı'] = 'i';
return $array;
}
Add this to your theme functions.php and rebuild the index, and now “ı” and “i” are the same as far as Relevanssi is concerned.
If you want to make this product code specific, it gets slightly trickier this way (it’d be easier to make “trıdent” match “trident” than to make “trident” match “trident” and “trıdent”).
Thread Starter
doyuk
(@doyuk)
Dear Mikko,
Thank you for your support.
Can I only do this for SKU?
Best Regards
It gets more complicated, but instead of the other function, use this:
add_filter( 'relevanssi_custom_field_value', 'rlv_i_customfield', 10, 2 );
function rlv_i_customfield( $values, $field ) {
if ( '_sku' !== $field ) return $values;
$new_values = array();
foreach ( $values as $value ) {
$new_value = str_replace( 'i', 'ı', relevanssi_strtolower( $value ) );
if ( $new_value !== $value ) {
$new_values[] = $new_value;
}
$new_values[] = $value;
}
return $new_values;
}
This will index values like “trident” as both “trident” and “trıdent” for the SKU field.