Joomla

How to Search and Filter Your Joomla Content

3 Mins read

Search

The Smart Search is a really powerful search engine, shipped with Joomla. It is also the default search component of Joomla 4.

Its power resides in the fact that indexes the content saved by the CMS by analyzing each term of the supplied text, setting a relevant weight. That allows it to provide relevant results based on the supplied search query.

Also creates content maps, i.e. groups of content based on specific attributes (e.g. type, category, language) that allow to further filter the returned results.

To check the content that is being indexed by the Smart Search, you have to visit the Smart Search > Index view, in the Joomla back-end.

Defining the Type of Content that will be Searched

In many cases, we need to limit the scope of the search. For example, if we have a blog section and we want to search the articles in our blog, we want our blog search, to look into our blog content only.

To do that we have to define the content that will be searched. We have to go to the Smart Search > Filters and create a filter for our context.

In the above example, I created a filter for the Articles within the Blog category.

Now to utilize that filter, we have to configure our front-end Smart Search module, appropriately. Go to your System > Site Modules and edit the Smart Search module or create a new one. They’re under the “Search Filter” setting, select the filter you created previously.

With the above configuration, the Smart Search module will only return results from the blog section.

Excluding Content from Being Searched

There is content that makes no sense to be searched. For example, our “Terms of Service” or our “Privacy Policy” are not articles that the user would like to get in the search results.

To exclude them, we have to go to the Smart Search > Index view and unpublish them.

Do note: If we edit and save any of those articles, their state will get back to “published”. We have to come back and set them to “unpublished”.

Filtering

Although the Smart Search offers some filters, they have limitations.

  • They are limited. Namely, it only offers filters for the Type, Language, Author and Category.
  • They are single select. We can only select one value in every filter.
  • They have a single display. We can only display them as drop-down lists.

Introduction to filters

JFilters is filtering extension for Joomla 4, developed by BlueCoder

We can summarize its top features in the following:

Filters the Content using Joomla’s Custom Fields, Categories, and Tags.

The Joomla’s Custom Fields are so powerful and gaining constant popularity. They are used massively to assign extra properties to the created content, allowing to customize their display in the front-end. We think that it is essential to be able to filter our content using them.

Also, the tags are an integral part of the content creation for years and the categories is a core feature, since day one.

Can be Combined with the Smart Search

In many cases, the user experience starts with a search and continues with filtering the search results. This is the usual path for most users when they are dealing with medium/high volume sites.

JFilters is loading the filters relevant to the search results so that they can be further refined based on the user’s desire.

Is SEO Friendly

Well, this is quite a broad term since SEO nowadays implies a good user experience. So in terms of SEO, we also imply that it is user-friendly as well.

  • Lightweight. Less than 3Kb of minified and gzipped CSS and javascript.
  • Search Engine Friendly URLs. All the generated URLs are clean and human-readable.
  • Updates the page title based on the selected filters. This allows our pages to display well in the SERPs.
  • Uses canonicals to avoid having identical content indexed more than once.
  • Uses meta-tags. Updates both the page’s description and its meta-tags giving your content better chances to rank higher in the SERPs.

How to Get it

There is a fully working, free version available at blue-coder.com

Conclusion

The main purpose of a CMS is to generate content. Our users should be able to find the content they are looking for in a fast and easy way. To achieve that goal, we have to provide reliable and user-friendly search and filtering functionalities. Joomla 4 provides a powerful search engine and there are 3rd parties that provide quality solutions for filtering.

“Sakis is a founder of BlueCoder. A firm aiming to advance the Joomla experience, providing solutions and sharing knowledge related to Joomla and the web in general. Sakis started as a desktop applications developer back in 2006 and later he was engaged with web development. In 2008 he developed his first Joomla extension that got great reception from the community. He developed several other extensions for Joomla and Magento since then.”

Leave a Reply

Your email address will not be published. Required fields are marked *