Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    By default, Relevanssi removes parentheses, leaving you with “1”, and that’s too short as the minimum word length is 3.

    To keep the parentheses, add this to your theme functions.php and rebuild the index:

    add_filter('relevanssi_remove_punctuation', function($a) {
    	$a = str_replace( '(', 'OPENINGPARENT', $a );
    	$a = str_replace( ')', 'CLOSINGPARENT', $a );
    	return $a;
    }, 9 );
     
    add_filter('relevanssi_remove_punctuation', function($a) {
    	$a = str_replace('OPENINGPARENT', '(', $a);
    	$a = str_replace('CLOSINGPARENT', ')', $a);
    	return $a;
    }, 11 );
    Thread Starter steve92

    (@steve92)

    Very good.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Search does not find items’ is closed to new replies.