Exclude product description from smart search?

  • Posts: 2
  • Thank you received: 0
  • Hikashop Essential
6 months 2 weeks ago #360778

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 4.4.3
-- PHP version -- : 8.2.18

Hello everyone,

I'm curious if there's a method to tweak Joomla!'s smart search feature so that it doesn't include product descriptions in its searches. Any insights or tips would be greatly appreciated!

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
6 months 2 weeks ago #360779

Hi,

I don't think that the Smart Search component in Joomla has the capability to dismiss some of the indexed content.
From what I can read, it would require not indexing the content in the first place:
forum.joomla.org/viewtopic.php?t=1000353
For HikaShop's product description, you can edit the file plugins/finder/hikashop/hikashop_j4.php (or hikashop_j5.php for someone on J5), and then change the line:

return Helper::prepareContent($summary, $params);
to:
return '';
Then, reindex the whole content and it should do it.

Note however that you will loose this change each time you update HikaShop.
To have a permanent solution, you would have to develop a copy of the finder hikashop plugin as suggested on that forum post, but it's a lot of work compared to just changing one line of code after updates...

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
  • Hikashop Essential
6 months 2 weeks ago #360825

Thanks a bunch for this workaround! It's much appreciated!

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum