This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Plural searches fail

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6566
    jonteeterjonteeter
    Participant

    I have noticed a lot of searches fail to catch relevant results simply based on whether they are plural or singular. For example, “keyboards” returns zero results but “keyboard” returns many. “acoustics” returns only 1 product whereas acoustic returns many. Is there a configuration setting that would resolve this? Or is there something simple you can add to improve the search in your next update? Please advise!

    #6571
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Well, there is no simple solution unfortunately, because of the irregular patterns of the singularization – pluralization forms of english language. In many cases adding/removing the “s” from the word ending is not enough.

    I’ve done some research, and looks like there might be a pre-created code that covers most of these cases as well. I’ve made a few changes to integrate it with the search, and it looks like it’s working as a temporary solution.

    Try putting the code on this url to your theme’s functions.php file: http://pastebin.com/raw.php?i=m4q0VF6K

    This will go through all search words inputted and detects if in singular/plural form, then it will append (invisibly to the user) the opposing forms as well to the search phrase.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Plural searches fail’ is closed to new replies.