• Hello,

    We are experiencing an issue with the “Keyword matching” setting: Whole words, which is not working. For example, we have several PDFs with the term “RPO”, but if we specify in the search something like “22_RPO”, it will not return “22_RPO”, but rather all the PDFs containing “RPO”.

    Could you please help us with this?

    Thank you in advance, and have a great day.

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

    (@msaari)

    By default, underscores are replaced with spaces, so “22_RPO” is indexed as “22 RPO”. You can fix this with

    add_filter( 'relevanssi_punctuation_filter', function( $replacements ) {
    $replacements['_'] = '';
    return $replacements;
    } );

    Add this and rebuild the index. Now “22_RPO” is indexed as “22RPO”.

    Thread Starter pineapplesquad

    (@pineapplesquad)

    Thanks for your return. We did add the code, but it’s not working… we’re being told that there are no search results.

    Plugin Author Mikko Saari

    (@msaari)

    Did you rebuild the index after adding the code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.