• Resolved JasperPress

    (@jasperpress)


    In one of my websites, I enabled the option to have Inside-word matching with:

    add_filter( 'relevanssi_fuzzy_query', 'rlv_partial_inside_words' );
    function rlv_partial_inside_words( $query ) {
        return "(term LIKE '%#term#%')";
    }

    I also have Highlighting active and I’m using the “relevanssi_the_title()” function. Now, while partial inside-word matching seems to be working on the search results, the highlighting is not applied on these inside-word matching keywords while other highlights are working just fine.

    Is this a bug or just a shortcoming of the inside-word matching function?

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

    (@msaari)

    It’s not really a bug, just the way it works. The highlighting has two modes: partial matching, where it highlights beginnings and ends, and whole word matching, where it requires a whole word.

    Since Relevanssi doesn’t support the inside-word matching option, the highlighting doesn’t do that either.

    However, there’s an easy fix for this: go uncheck the “Uncheck this if you use non-ASCII characters” option in the Excerpts & Highlights settings tab. That is included for a different purpose, but what it actually does is to disable the word-border matching (because that doesn’t work with for example cyrillic alphabet). That will enable inside-word highlights.

Viewing 1 replies (of 1 total)
  • The topic ‘Partial keywords inside words issue with highlighting’ is closed to new replies.