What is the best way to handle plural in searches?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support What is the best way to handle plural in searches?

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17993
    LisaA
    LisaA
    Participant

    I am trying to find out what the best way is to handle plural in searches.

    #17995
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    There are multiple solutions I can recommend, depending on your requirements.

    1. Using the Synonyms interface. This is a global solution, not too difficult to configure, the documentation describes all the neccessary steps and pre-requesites. No coding is required in this case, however it only works for Post Type results (Posts, pages, products, etc..)

    2. Using the additional keywords meta-box feautre. It is very easy to use, however it must be defined for each post individually.

    3. Using this custom code. This lets you define keyword replacements for the input search phrase itself. It can be used in this case as well, as you can define either the singular -> plural, or the plural->singular definitiions, whichever you prefer.

    There is no better ‘automatic’ resolution, as this is a language dependend feature, and unfortunately there is no usable/compact library that we could include within the plugin.

    I hope this helps!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #17998
    LisaA
    LisaA
    Participant

    After I sent the support request, I found a link to https://wp-dreams.com/forums/topic/plural-searches-fail/, would you recommend this as well?

    #18000
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Yes, that could also work. It is an external library I merged with a custom code, I completely forgot about it. It is more of an experimental solution, so please make sure to have a back-up just in case.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.