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 4 years, 10 months ago.
- AuthorPosts
- May 24, 2018 at 9:35 am #17993
I am trying to find out what the best way is to handle plural in searches.
May 24, 2018 at 9:59 am #17995Hi!
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 :)
May 24, 2018 at 10:42 am #17998After 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?
May 24, 2018 at 10:46 am #18000Hi,
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 :)
- AuthorPosts
You must be logged in to reply to this topic.