How to Use the Joomla Smart Search Component
Go ahead and click on components and Smart Search. The Smart Search component is actually pretty amazing. What it does is it indexes your entire site and gives you, well, a Smart Search. The first thing to do is enable the plugin. Let's go ahead and do that. Click on this link, enable this plugin and go ahead and enable it by clicking on the X becomes a green checkmark. Go back to the component and you'll only need to do this once. Go ahead and click index. This is going to index the entire contents of your website. Obviously, that's pretty quick on our site here. We've just got a few articles. On a much larger site, that might take just a little bit of time. So we have all of our indexed content. We can see what type it is and we can see the actual machine link to that item. Alright, so there's a couple of other things here. We're not going to worry about them just yet. Let's get the search on our site and then we'll come back to this. So we show our search in a module, kind of like the login or the menu. Click extensions and modules and go ahead and click new. Scroll down and select smart search. Let's call this search. Let's put it in position 8, that's the left hand side we've been using all along, and then, over on the left here again, we haven't created any filters yet. I'll show you how that works in just a moment. Search suggestions, advanced search. We're going to hide the advanced search for now. It'll show up on the search results page and we'll leave all of these at the defaults, just so we can see how it works. Go ahead and click Save and close. Head over to your home page and you'll now see a search bar. Go ahead and type a search term. I know the word summer is included. In fact, it's in my welcome to Joomla ville article. You'll notice now there's an advanced search button here and, if I click on that, I can create very, very detailed searches and get just the results I want. Well that's pretty amazing, but there's even more. Let's take a quick peek here. Back over on my site, if I go to components and smart search again, the content maps are just what the index content is mapped to but the really fun thing is search filters. Search filters allow me to, well, what it sounds like: filter my search results and give those up to my users. So, for instance, if I wanted a search page that only looked at articles in 2016 from a particular category, well, I can create that. In fact, let's do that now. Click on new and let's call this 2016 attractions. So we're going to limit the search to any articles in the attractions category from 2016. Scroll down and you'll see the ability to toggle any of these selections. So I could say only articles by super user, for instance. Click on search by category and choose attractions. Scroll down to the bottom and search by type, choose articles. So now that's just the articles in the attractions category. If I click on the filter timeline now, I can say after it's January 1st 2016 and before January 1st 2017. Now this will only produce 2016 articles from the attractions category. Click Save and close. So, coming back over to my search module, extensions, modules and search, I'm going to change the search filter to just 2016 attractions. Go ahead and click Save. Go back to my site and hit refresh on my homepage and now go ahead and search for the word zoo. You'll notice the only result is the zoo article, even though the word zoo is right here in my welcome article. Congratulations, you've filtered your search. You can do this in multiple ways and have multiple smart search items on your site. Even if I use the advanced search, the only article that's going to show up is the one that's in the correct category. For a global search, don't use any filters but, if you need a specific search in a specific area of your site, well then you can use this smart search component.