• I’m looking for a way to see if I can adjust the number of characters that are wrong?

    For example fg-3000 it will search correctly if I omit the dash (fg-3000) but won’t show results if fg-3000r for instance. I was looking to see if there was a way to do it where the extra or incorrect character is in any position.

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

    (@msaari)

    First, you can control how Relevanssi handles the dashes from Settings > Indexing > Advanced indexing settings. It may make sense to adjust that to “remove”.

    Second, you can control partial matching from Settings > Searching. You can either choose “whole words”, i.e. the whole word must match, or “partial words”, in which case “fg-3000” would find “fg-3000r”.

    Unfortunately, there isn’t an option to allow extra letters in the search terms. I’m not sure there’s a way to do that without causing the search results to include lots of garbage.

    It’s possible to adjust the search terms manually to cover cases that are useful for your specific needs. For example, you can use the synonyms feature to make “fg-3000r” a synonym for “fg-3000”.

    • This reply was modified 2 years, 2 months ago by Mikko Saari.
    Thread Starter shuangmiles

    (@shuangmiles)

    I have it set to Partial Words but it couldn’t find fg-3000r. I’m not sure why it can’t find fg-3000 but there are results for rfg-3000.

    Does it support if any one character from the word is incorrect?

    Plugin Author Mikko Saari

    (@msaari)

    No, it doesn’t. It is just partial matching at the word’s beginning or end. Searching for “ban” will find “banana” or “urban”, but not “Trabant”. Searching for “bananas” will not find “banana”, but searching for “banana” will find “bananas”.

    With the default settings in Relevanssi, dashes are replaced with spaces, and two-letter words are ignored. Searching for “fg-3000r” is a search for “fg 3000r”. In the “fg-3000” post, the “fg” is ignored, and “3000r” does not match “3000”. In the “rfg-3000” post, the “fg” is a partial match for “rfg”, and that’s why that post is found.

    If you adjust the minimum word length to 2 and reindex, searching for “fg-3000r” should find all posts with “fg” in them.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is there a way to adjust the number of characters that can be wrong?’ is closed to new replies.