Skip navigation
ocPortal Tutorial: Searching your website
Written by Allen Ellis, ocProducts
As you add content to your website, it becomes increasingly important that your visitors are able to find your content when they need to. ocPortal includes a 'search' feature, which allows you to search your entire website for content.
Simple searching
The search block
|
By default, there is a 'search' block that sits on a panel of the 'Site' zone of your website (assuming it was not disabled in the Setup Wizard). This is the easiest way to use the search. There is a text box where you can type what you're looking for. The 'Search Content' button will then search your entire website for matching content and results will be displayed on a results screen.
Detailed searches
If you would like to carry out detailed searches, there is a 'More' button in the search content block. Clicking this will bring you to the main search screen, which has several options:
Search For
Detailed searches
|
This is the text box where you type the content that you're searching for.
Boolean Search
Choosing to do a boolean search will make several more options available:
- Content must contain all of these words
- Content must contain one or more of these words
These two options are self-explanatory.
After selecting 'Boolean search', you also gain the several searching possibilities, that you may activate as follows:
- Put speech marks around words that you would like to occur in sequence
- Put a '-' before a word to shun it
- Put a '+' before a word to require it.
Search only titles
With this option checked, ocPortal will only search titles of content.
Author/Submitter
In this field, you can type the name of a member on the website. If you do this, ocPortal will only look for entries that this person has submitted. It also matches against author names.
Submitted within the previous
In this field, you can set a cut-off date, to not show entries that are older.
Sort by
In this field, you can specify what order you would like your results shown in.
Search the following content types
Placing a checkmark beside each content type will cause ocPortal to search for entries in these content types. Clearing the checkbox will cause ocPortal not to search in these locations.
Google search
The Google search will carry out a search of the site using the index of the Google search engine. Upon filling in this separate form you will be redirected to a Google results page (the Google search is commented-out of the search templates by default, as the ocPortal search engine can search with more control and understands the data better).
Advanced searches
Performing an advanced search for a specific content type
|
Many forms of content allow advanced searches which allow you to search underneath a chosen category. For members and catalogues you may also perform template searches. An advanced search limits you to that individual content type. The advanced searching screen is reached by clicking one of the 'Advanced' links on the main search screen.
Searching from the Forum
The search button on the forum
|
To initiate a search while in the forum (our own
OCF
forum), you need to click the 'Search' button on the forum or use the contextual search box on the forum member bar. The contextual search will search beneath your current forum if you are on a forum-view screen, or within your current topic if you are on a topic-view screen.
OpenSearch
ocPortal can support
OpenSearch, which allows your users to search your website from directly within their web browser (currently available in Firefox and Internet Explorer). It also supports 'Google Suggest' style search suggestions, based on past searches performed.
By default OpenSearch is configured (via the
HEADER template) to only be active within a zone named 'docs' and for it to only search Comcode pages. You can, however, configure it to perform any search types you like via changing the code used in this template. You should make sure you have a 'favicon' before enabling OpenSearch, as it is important the web browser has one of these available to use.
Improving search results
The title fields, and meta keyword fields, get precedence when search results are determined. Tuning these manually for your can improve search results considerably.
If you are using MySQL, also considering turning the
MySQL minimum word length down to 3 (the default 4).
Concepts
- Boolean search
- A search carried out by testing for exact word or phrasal matches to a number of criteria