Setup Smart search with Tags and Categories

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Post Reply
oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Feb 17, 2009 2:19 pm

Setup Smart search with Tags and Categories

Post by oorzaak » Thu Nov 04, 2021 2:25 pm

Hi,

I'm trying to set up Smart search on a new J4 site (building from scratch), and I would like to achieve the following:

- I want to find Articles, both based on their content and on the Tags and Categories that they are assigned to;
- In the Search results display, I want to display only Articles; I assume that users are not interested in finding Tags or Categories as search results.

I cannot figure out if this is possible and, if so, how to do this.

User avatar
sakiss
Joomla! Explorer
Joomla! Explorer
Posts: 285
Joined: Wed Aug 20, 2008 4:09 pm

Re: Setup Smart search with Tags and Categories

Post by sakiss » Fri Nov 05, 2021 12:56 pm

Unfortunately it is not possible atm :(
You have to add those fields as text (e.g. in your article's meta-description).

oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Feb 17, 2009 2:19 pm

Re: Setup Smart search with Tags and Categories

Post by oorzaak » Mon Nov 08, 2021 7:58 am

Hi Sakiss,

Thanks for your reply. I checked adding the name of the tag or category in the meta description field and that works indeed. I also checked adding the name in the meta keywords field and that works as well.

I will ask a developer to make a Joomla content plugin for this project so the author will only have to add the category and tags, and leave it to the plugin to replicate the names of these assignments to a meta field.

User avatar
sakiss
Joomla! Explorer
Joomla! Explorer
Posts: 285
Joined: Wed Aug 20, 2008 4:09 pm

Re: Setup Smart search with Tags and Categories

Post by sakiss » Mon Nov 08, 2021 2:13 pm

I will ask a developer to make a Joomla content plugin for this project so the author will only have to add the category and tags, and leave it to the plugin to replicate the names of these assignments to a meta field.
Would be good to share that with the community.

oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Feb 17, 2009 2:19 pm

Re: Setup Smart search with Tags and Categories

Post by oorzaak » Mon Nov 08, 2021 4:25 pm

Would be good to share that with the community.
Strictly speaking this project is paid by a customer and he will be paying the developer for this custom plugin.

However, I agree that the community would benefit so I'll see what I can do.

User avatar
sakiss
Joomla! Explorer
Joomla! Explorer
Posts: 285
Joined: Wed Aug 20, 2008 4:09 pm

Re: Setup Smart search with Tags and Categories

Post by sakiss » Mon Nov 08, 2021 4:37 pm

The majority of the developers are paid for their work, unless they are super rich.
I suppose that you do so, despite using a completely free, open source project.
The majority of the free extensions out there were paid by someone in the 1st place.

Hence getting paid and sharing your code are 2 different things.

oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Feb 17, 2009 2:19 pm

Re: Setup Smart search with Tags and Categories

Post by oorzaak » Mon Dec 06, 2021 9:50 am

oorzaak wrote:
Mon Nov 08, 2021 7:58 am
I will ask a developer to make a Joomla content plugin for this project so the author will only have to add the category and tags, and leave it to the plugin to replicate the names of these assignments to a meta field.
I discussed the above with an accomplished Joomla developer. However, we came to the conclusion that this solution is a workaround that may work for the short term but may compromise the database over a longer period of time. E.g. if a tag is no longer in use after some time (unpublished or trashed), how would that be updated in the articles to which the tag was assigned?

The tag component is the prefect way of keeping track of the tag assignment which should not be "doubled". The issue is in the fact that the tags are not taken into account by Smart Search in a way that suits our practical approach to using the search.

This, combined with other priorities in the current project, made me decide not to go the path of this plugin but rather ask this to the Joomla community:

Are more people in need of this feature in the Joomla 4 Smart Search? If so, we should ask the develop team to make a change to the Smart Search so an article can also be found when searching for the tags and/or category that are assigned.

User avatar
sakiss
Joomla! Explorer
Joomla! Explorer
Posts: 285
Joined: Wed Aug 20, 2008 4:09 pm

Re: Setup Smart search with Tags and Categories

Post by sakiss » Mon Dec 06, 2021 1:47 pm

You can do with that with a finder plugin which updates the indexed content whenever there is a change either in the content or the tags.

oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Feb 17, 2009 2:19 pm

Re: Setup Smart search with Tags and Categories

Post by oorzaak » Tue Dec 07, 2021 8:30 am

Thanks for your reply, and I understand that it should be possible to create a plugin that does not have these drawbacks. Yet in the end this would still be a workaround that requires an extra plugin added to the core installation.

I think it would be a better solution if Smart Search could have this as an extra feature: including assigned tags and/or categories to the search arguments for finding an article. I believe that this is a feature that makes sense in practical use.

It would be interesting to know if more people want to have this feature?


Post Reply

Return to “Administration Joomla! 4.x”