Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Trademark symbol problems
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 3 months ago.
- AuthorPosts
- February 18, 2020 at 6:29 pm #25852
Hello – we get our product listings and product titles from a 3rd party API and drop them into WooCommerce. Your index appears to be indexing the trademark icon, so that when customers invariably do NOT search with the trademark, the exact match is unlikely to appear. For example – we have many items with the first name “Cataplex” such as Cataplex A, Cataplex E, Cataplex F, etc.
If someone searches for cataplex® f then the searfch results will find Cataplex F Tablets correctly, but if I search cataplex f without the trademark symbol, this product cannot be found. Is there a way for me to strip out the trademark symbol in our indexed results?
Attachments:
You must be logged in to view attached files.February 19, 2020 at 10:07 am #25867Hi,
Well it should be possible via a custom code, which hooks to the extraction process, and removes the unwanted character. I have quickly constructed something that may work. After applying the code, you will have to re-create the index for it to work.
Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
Best,add_filter( 'asp_indexing_string_pre_process', 'asp_remove_addition_chars_index', 10, 1 ); function asp_remove_addition_chars_index($str) { return str_replace('®', '', $str); }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 19, 2020 at 4:58 pm #25888In fact, doing this pushed one of the two needed results further down the list.
So again, searching “cataplex f” used to find only Cataplex F Soft Gels and then all sorts of other cataplex variations. Now that same search puts Cataplex F Soft Gels in the 8th position.
Any other suggestions?
February 20, 2020 at 9:42 am #25892Can you please try this logic configuration: https://i.imgur.com/iD7ifNV.png
Best,
By default the “f” in “cataplex f” is ignored in fuzzy matching, because the keyword lenght is 2. Changing that configuration should very likely bump those results to the top.
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.