FREELessons: 35Length: 7.7 hours

Next lesson playing in 5 seconds

  • Overview
  • Transcript

6.8 Smart Search and Tags

We’ll now carry on learning about the smart search component by applying a filter to the smart search module. Additionally we’ll learn about the components global configuration. Then we can dip into tags, which allow us to collate data from all different components.

6.8 Smart Search and Tags

Hi, guys. Welcome back to A Beginner's Guide to Using Joomla. And in this lesson, we wanna carry on learning about the components in Joomla. So, now what I'd like to do is drop down the Components menu and go to Smart Search. And from here, we have the last option in the left-hand sidebar, which is search filters. From here we can create predefined search filters to apply to our smart search module, so I'm gonna create a new filter. I'm gonna provide a title, first of all, so I can identify this filter at a later date. We can also set the status to be published or unpublished to temporarily disable this filter. I'm gonna change it back to Published so this filter is enabled and we can view the map count, which is currently set to zero. Now you'll notice we have all of our branches right here, and we have our individual branches like so, and in there we can see the nodes of each individual branch. So we can say we'll search through all of the different branch types, which is Author, Category, and Country. However, what I can do is say only Search By Author. So when the user types in a search term, the filter's gonna kick in and say, right, we're gonna search via the author of the content, not the category of the content, item, and so on and so forth. Now I can be a little bit more in depth, instead of searching the entire branch, we can say only show items that relate to the user Lawrence or the alias Loz. So don't forget my alias for this user account is Loz. So any content created by me, this user account show it up in the search results. And of course, you can have multiple categories and multiple countries, and so on, and so forth. So you have a really in-depth filtering system here. Then also you have your publishing options. So for example, the Created Date, who created this filter, and you can provide an alias for that user and also you can look at when it was last modified, and which user last modified this filter. Then we have the filter timeline. This allows me to increase the relevancy of items depending upon the date that they were created and published. So we have when was the start date before and then we can select a date. So all content that was created before a certain date will show up in the search results and the same can go for the Ending date as well. Now you also have Before, Exactly and After for both. I'm just gonna set that to None and delete that out, and I'm gonna say Save and Close. Now you'll notice the map count has increased to two and if I click back on here you'll notice the map count changed to two, and that's because we have two nodes selected. So now that we have this, let's save and close and apply this filter to the smart search module. So underneath extensions we're gonna go to the module manager and from there we need to find the smart search module. Then once we have the smart search module we need to apply the filter. So now when we drop down the filter you'll notice Loz now appears, then what we can do is go ahead and save this. Now that filter is being applied to the Smart Search Module. So now notice what happens on the front end. When I click on Advanced search, this is the menu item directly to an Advanced Search page we have all of the drop downs. Now notice the difference when I go through the Smart Search Module with my new Filter applied. I'm going to search for, let's say, something like TutsPlus. So, I'm going to search for that through the module, and now I'm going to drop down the Advanced Search. You'll notice only Search by Author is available, and we only have Lawrence and Loz. That's because we went through the Smart Search which has the Loz filter applied. So, now it's going to look through items that relate to the search term Tuts plus and then it will only show items that are associated or created by Loz or Lawrence. So that is advanced filtering and now what we'd like to do is take a look at the smart search components Options. So firstly we can enable Gather Search Statistics. Now even though we're talking about the smart search component, the statistics from the smart search component will show up on the search components page. So please do bare that in mind. On top of that, we can also say whether we want to show the result's description for each item returned. Then we can limit the description's character count, and when it reaches that maximum limit, you get the ellipses, then we can allow an empty search. This means that if there is no information provided in the search field and we hit Return, it can allow the search results. But currently I've got that set to No, which means it won't go off and try to search and return no results. Then we can show the resulting URL for each item returned. Then we can show search suggestions. Also Did You Mean for any search phrases that were mistyped. A query explanation explaining exactly what the return was for a query. Whether we show the Advanced Search section. Also, whether or not to show advanced tips for more information about filtering. Then, also, we can say whether we want to, by default, have the advanced search section expanded or contracted. So, I'm gonna leave it on No so it stays collapsed, and the user has to expand it. We can also optionally show date filters. Then we can choose how the return search items are sorted. For example, are they sorted by their relevance to the search term, the date or the list price. I'm gonna leave it on relevance and then we have the choice of the Sort Direction. So I'm gonna leave it on Descending. So what happens is the most relevant is at the top and it descends down the list with each item getting lesser in relevance to the search term. We can optionally highlight search terms within the return results and on top of that, apply an open search name and open search description. Now what I'd like to do is take a look at the Index tab. We now have the index of batch size. So when we go on to the Smart Search component, the first thing we do is index all of the items found throughout the Joomla installation. So what it's doing here is it's saying well, get 50 items, group them together, index them, then delete them out of memory, then find another 50 items, index them, and so on and so forth until it finishes indexing all the items in the Joomla installation. Now we can increase the batch size, but that will use up more server memory. So if you are getting server errors saying, sorry, you're run out of memory, then you need to decrease the index of batch size. Then we have the Memory Table Limit. This allocates a certain amount of memory that the finder tokens and the finder tokens aggregate tables can store. Now if you go ahead and index all the items in your Joomla installation, and you get errors saying that either or of those tables are full and it's unable to properly index, you need to increase the memory limit. However in our case we don't get that error, so I'm gonna leave it on the default 30,000. Then we can affect the relevancy system of the smart search component. So when a user types in a search phrase, how important is it for all or part of that search phrase to match the title text, the body text of the item, the metadata, the path text. And we also have the miscellaneous text multiplier. When you set this, this multiplier is used to control how much influence matching text has on the overall relevance score of a search result. Then we can enable the stemmer. So what is the stemmer first of all? Well you have a word like make, this is the stem, and then you have variations of the word that stem from the word, so making and maked. So what the stemmer enables you to do is, if someone types in a search term make, it will automatically associate making and maked with make, the stem the root of the word. So we can enable the stemmer and we can choose the type of stemmer such as Snowball which is by default, or you could select a stemmer for a specific language. Ideally if your site only has one language installed, then you need to select your language if at all possible. You can leave it on Snowball if you want, and if you have multiple languages installed, then it's best to leave it on Snowball. Also we can Enable Logging. Now when it comes to indexing, let's say you have errors, but you can't find out what that error is. It's not a memory limit it's none of that. What you can do is enable logging. This will generate a file in the log directory. And then you can go and look at that file and find out exactly what the error was in the indexing process and what item it errored on. And then, finally, we have the permissions for the Smart Search component. So now what I'd like to do is move on and take a look at the Tags component In Joomla. So what are tags in Joomla? Well, tags allow us to associate items together. Now these items can be a part of all different types of components. For example, we have the user note categories and for each one of those categories you can assign tags. You also have articles, article categories, contacts and contacts categories. Each one of those items, whether they be an article or a contact or a category for an article or a contact, you can still associate tags with them. And again, there are lots more examples throughout the entire system where you can associate tags with items within different components. So what you can do is collect all those different items together that may relate to one another and join them together with a Tag, or multiple Tags. So, I'm going to now create a new Tag and associate that with some pieces of data throughout the Joomla installation. So let's create a new tag, let's give it a Title, so I'm gonna say Tutsplus. Then I can provide an alias, I can provide a description, and then on top of that we can also define the parent tag. So I can nest this Tutsplus tag inside of the Lessons tag. We can also select the status, viewing access level, assign a language, attach a note that's visible on the backend, and also a version note for when we save this item, we can have multiple versions and multiple version notes. Publishing options, again, it's all pretty much standard. Lots of informational fields, including you can assign who created it and an alias for the person who created this tag, some SEO information. We also have some options such as what layout would we like to choose. So I can either use the Global Default Configuration or from the component we have two different types of layouts. So the Tags component has the default layout and a compact layout. I'm just gonna say Use Global for now. We can also provide a CSS class for the tag link, so let's just make this a bit more specific. I can say Tutsplus, and then I can go into the style sheet and style this link specifically. Then also we have the images we can associate with a tag, so we have the Teaser image which is shown on the list layout page, and we'll look at that at a later date. But right now just want to quickly find an image and then insert it. Again we have the Float, the Alt attribute text and also a Caption we can associate with the image. The same with the Full image, so I'm gonna select a full image right now. Let's go into headers, and let's go with the nice image right there. And again, I'll leave everything at their defaults and blank. So I'm gonna say Save and Close and now we have the Tutsplus tag nested inside of the lessons tag. So now I want to associate the newly created Tutsplus tag with different items throughout the Joomla installation. So, lets first of all start out with the User Note Categories. And I can go into each individual category and I can click on the tags field and I get a list of all of the tags that are available. Now we have lessons/tutsplus, so now we have the Tutsplus tag associated with this category. And technically it does have a little association with the Lessons tag because the Tutsplus tag is nested inside of it. But we can also directly link the Lessons tag as well to this item. But however, I'm not gonna do that, I'm just gonna quit that, and then I'm gonna say Save & Close, and I can do the same for Good Notes as well. Then on top of that, let's take a look at a few more different items. So, we have the Articles. And what I can do is instead of going through each individual article, I can take multiple articles and then Batch process. From there, I can add a tag to each one of the selected items and associate them with the Tutsplus tag. So I'm gonna hit Process and there we go. Now if I click on, let's say, one of those articles that I ticked, we have Lesson\Tutsplus. Now also we can take a look at the category manager for the article. So I'm gonna select both of these article category items, batch process them and then we're gonna add the tag Tutsplus and click process. And again you have all different types of content that you can tag, for example you have banner categories. Not banners themselves but banner categories you can, contacts and contacts categories. You also have news feeds and so on and so forth. So there's a whole different range of items in all the different components that you can tag and consolidate together. So that's what tagging is all about. It's about bringing together all different items of the Joomla installation and putting it into one nice, neat place. So the tags component has both the module and also menu item types associated with it. So very quickly, for modules you'll go to your module manager. You can add in a new module, scroll down, and there you will find Popular Tags. And from here you can provide a title, assign a position, and you can set the maximum number of tags, so how many tags will appear. You'll notice I've already got that module assigned to the sidebar and so we have Popular Tags, we have Tutsplus, and Lessons. You can limit that so there's five currently by default and then you can play around with these settings. And so when you click on the tag, it will produce a page that will show you all of the different items that have been associated with that tag. Regardless of the type of item that's been associated with the tag, they'll all show up here. So thank you for watching me in this lesson, and please join me in the next lesson where we'll continue on learning about the tags component.

Back to the top