Ivory Search › Forums › Support › Singolar and plural
- This topic has 5 replies, 2 voices, and was last updated 2 years, 4 months ago by Ivory Search.
You must be logged in to create new topic or reply to the topic. Click To Login
- AuthorPosts
- June 24, 2022 at 3:27 PM #12237
in the Italian language, the last letter of a word identifies the singular or plural. (example: MelA is singular; MelE is plural).
I would like to know if possible, with your search plugin, to exclude the last letter to allow the user to do a unique search for singular and plural (eg “Mel” and the result is both MelA and MelE)
Thankyou
- June 24, 2022 at 7:11 PM #12239
I hope you are well today and thank you for your question.
Yes, you can achieve this by configuring the search form using any of the Fuzzy Matching options as shown in the attached screenshot.
Best regards,
Ivory Search SupportAttachments:
You must be logged in to view attached files. - June 25, 2022 at 6:06 PM #12255
Thank you for the answer!
Just for information: online I saw some strategies that use presearch hooks, in order to split the search word and change the last 2 or 3 letters. Is it something possible also with Ivory?
- June 27, 2022 at 8:03 PM #12268
If you can achieve this using the plugin search option as described above then why do you need a hook to achieve it?
- June 27, 2022 at 8:33 PM #12269
Because the fuzzy method has the drawback to be too generic. I mean , it includes words that the customer doesn’t want : example -> word MARGARINA, the user search for GARINA which is another word to be matched , results include also MARGARINA that shouldn’t be included.
The splitting is a more specific feature in terms of plural and singular problem.Thankyou for the support
- June 27, 2022 at 8:48 PM #12270
You can use plugin hooks ‘is_posts_search’ and ‘is_pre_get_posts’ as declared in the below plugin file.
https://plugins.trac.wordpress.org/browser/add-search-to-menu/trunk/public/class-is-public.php
- AuthorPosts
You must be logged in to create new topic or reply to the topic. Click To Login