components-searchThe Joomla Search component allows you to do two things - view statistics about what people are searching for on your site and customize the available search settings. In this tutorial, we'll cover both of these topics, starting first with search statistics.

Search Statistics

Enabling gathering of search statistics

When you first access the Joomla Search Component, you'll see a Gathering statistics disabled error message. To being using the search statistics feature, we'll first enable statistics gathering.

  1. Log into your Joomla 3.0 admin dashboard
  2. In the top menu, click Components and then click Search
  3. Click the Options button towards the top of the page
  4. Set the Gather Search Statistics setting to Yes, and then click the Save & Close button towards the top of the page.

    The page will refresh and then you will see a message that says Gathering statistics enabled.

Viewing what users are searching for

In our testing, we used the search module on our website to search for the following words (each one in a separate search): apple, orange, and fruit. Using the search statistics feature, we can see information on these searches that we just performed.

  1. Log into your Joomla 3.0 admin dashboard
  2. In the top menu, click Components and then click Search

    search-statisticsThat's it! As you can see in the screenshot to the right, Joomla shows a listing of all phrases searched for on the site, how many times each phrase was searched for (referred to as hits), and the number of results for each search.
     

    Showing the number of search results

    In the screenshot above, you can see under the Results column it simply says Off. If you want to see how many search results are returned for each search phrase, find and click on the button that says Show Search Results.

    In our testing, we don't have any articles about oranges, apples, or fruit. We do have a few articles about the word blog, so we'll show you how the Results feature works by searching our site for blog.

    As you can see in the screenshots below, we have 9 results for the word blog, and the search component similarly shows 9 search results.

    A search for the word blog Results data shown in the search component
    nine-search-results-returned search-component-showing-nine-results-as-well

Reseting search data

For busy websites, your users may search on your website quite often. With so much data showing in the search statistics, it may make it difficult to find the information you're actually looking for. Clearing the search statistics will remove all data, and allow you to start fresh.

  1. Log into your Joomla 3.0 admin dashboard
  2. In the top menu, click Components and then click Search
  3. In the top menu, click the Reset button.

    You can see below what the search statistics look like before and after we click the reset button.
    Before clicking reset After clicking reset
    before-clicking-reset after-resetting-search-statistics

Search Options

There are several options available that you can use to customize the way your Joomla site's search works. Below, we will show you how to access these settings, and we will also explain what each of them controls.

  1. Log into your Joomla 3.0 admin dashboard
  2. In the top menu, click Components and then click Search
  3. Click the Options button towards the top of the page
  4. Adjust the settings as you see fit, and then click the Save button in the top left of the page. Below is a summary of several of the settings.

     

    Use Search Areas

    search-onlyThe Use Search Areas setting gives your users the option to search only through certain types of content. For example, if the user only wants to search through Newsfeed and not Articles, using the search areas feature (shown to users as Search Only) they can do this. If you disable this setting, the Search Only feature (highlighted in the screenshot to the right) will not show to users.

     

    Created Date

    search-created-onBy default, when you search a Joomla site, in the results the date the article was created on will show. If you disable the created date feature, the search results will no longer show the Created on data. In the screenshot to the right, we've highlighted the created on feature so you know exactly what it is we're referring to.

     

    OpenSearch

    opensearchAre you familiar with the Google search bar in the top right of your firefox browser? That's an OpenSearch feature. If you see in the screenshot to the right, when you're on our Joomla site's search results page, users have the option to add a custom OpenSearch toolbar, which will allow them to quickly search our site, and only our site.

    OpenSearch was developed in 2005 by Amazon. In our many years in technical support, the phrase OpenSearch has not come up often, but most everyone is familiar with what it is (but maybe not its name).

    The Joomla Search Component includes two OpenSearch settings, OpenSearch Name and OpenSearch Description.

    In our testing, we entered the following settings:

    OpenSearch Name Joomla 3.0.2 Testing site
    OpenSearch Description This website is driven by Joomla 3.0.2, and is used as a testing ground for testing Joomla.

    Now that we've adjusted these settings, how do we see what has changed?

    Go to your Joomla website and perform any search. Then view the source code of the page and you should see something similar to the follow:

    <link href="http://domain.com/component/search/?searchword=blog&ordering=newest&searchphrase=all&limit=20&format=opensearch" rel="search" title="Search Joomla 3.0.2" type="application/opensearchdescription+xml" />

    If you access this URL, it will prompt you to download a file named download.osdx. When you open that file with a text editor, such as notepad, you should see something similar to the following:

    <?xml version="1.0" encoding="utf-8"?>
    <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>Joomla 3.0.2 Testing site</ShortName>
    <Description>This website is driven by Joomla 3.0.2, and is used as a testing ground for testing Joomla.</Description> <InputEncoding>UTF-8</InputEncoding>
    <Image type="image/vnd.microsoft.icon" width="16" height="16">http://domain.com/templates/protostar/favicon.ico</Image>
    <Url type="application/opensearchdescription+xml" rel="self" template="http://domain.com/component/search/?searchword=blog&ordering=newest&searchphrase=all&limit=20&format=opensearch"/>
    <Url type="text/html" template="http://bradm.rubelix.com/joomla3.0.2/index.php?option=com_search&searchword={searchTerms}"/>
    </OpenSearchDescription>

    We'd love to tell you what all this means, but it honestly isn't something we're very familiar with. The take home point is that the Joomla allows you to customize these OpenSearch settings if you need to do so.

    Search for

    If you notice in the screenshots above, the search feature includes a Search for option. This option allows users to search either for All words, Any words, or Exact Phrase.

    We received a question on how to hide this functionality. There does not seem to be a setting in Joomla to do this. To accomplish this however, we can edit our template's CSS.

    To hide the Search for feature, edit your template's CSS file and add the following code to the bottom:

    #searchForm fieldset.phrases {display:none;}

    If you're using the protostar template, this is the file you will need to edit:

    templates/protostar/css/template.css

    In our testing, using this 'work around' solved the problem. After making the change, be sure to clear your browser's cache so the update CSS file is used.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

n/a Points
2014-06-06 10:57 am

Hi,

I do this but in the last version of Joomla the "show search results" make a blank page !

I resolve the problem in the file : www/components/com_tags/models/tag.php on line 174

//line added to repair search blank page in admin BO sandro 20140606

$params = JComponentHelper::getParams('com_tags');

//Remove this line because error on search blank page in admin BO sandro20140606 

//$params = $app->getParams();

 

Sandro from www.italie-visite.com

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

1 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!