FM SiteSearch Documentation
Search Settings & Options
2.1 Getting Started
2.1 Getting started
2.2 Search Settings
2.3 What to Search
2.5 Building a search index
2.6 Search HTML Code
2.7 Specialized Searches
2.8 Search Statistics
2.9 How to use the unix cron program to build a search index.
Adding full search capability to your web site, once you have FM SiteSearch up and running should be easy. Before placing a search box on your web site, you will need to set the options of how FM SiteSearch will search your web site. Read below for a detailed explanation of all settings & options.
2.2 Search Settings
You can set various settings on how your search engine will function when clicking on the 'search settings' tab when in the control panel. Below is an explanation of the various settings.
FM SiteSearch uses 2 methods of searching. The plain method of searching is where FM SiteSearch Pro opens all your web pages and searches through them on the fly. If you have less than 100/200 pages you can set the 'search method' setting to plain.
Search Index (Pro Version Only)
The Search Index method of searching is where FM SiteSearch searches through a specially created file that has your web pages indexed in a special way for optimum performance or search speed. If you use a Search Index then you will need to build a Search Index. You can build a Search Index at any time by clicking the 'Build Search Index' tab or button when in the control panel. If you use Mysql, then your web pages will be indexed into a Mysql database - Mysql is recommended if you have more than 1000 web pages that you would like searched.
File Search Settings
File types to search
This is the type of files that FM SiteSearch will search through. Specify the extensions of file types that FM SiteSearch should search through.
File names to exclude from searches
This is the file names that you do not want searched. FM SiteSearch won't search through the files that you specify.
Search Listing Settings
These settings will effect the results displayed to visitors when they search your web site.
Matched Keyword Icon
This icon is displayed next to text/paragraph that had a matching keyword or keywords. The matching keywords are highlighted from the top most paragraph of the page where the keywords or keyword matched.
Background color of keyword matches in matched descriptions:
This is the background color of a highlighted keyword that matched in text of the page that has been searched.
Text color of keyword matches in matched descriptions:
This is the foreground or text color of a highlighted keyword that matched in text of the page that has been searched.
Icon displayed next to matched link meta description:
This icon is displayed next to matched search results that has been searched that had a meta description tag.
Background color of meta description text:
If a page contains a meta description tag and has been matched in search results, then the description will be available in the search results. The description can be highlighted. This setting refers to the background color of a meta description in search results.
Text color of of meta description:
Foreground color of meta descriptions displayed in search results.
How many results would you like to display per page:
This is the number of matches or search results that is displayed on a 'per page' basis.
Would you like a new window to be opened when a user clicks on a matched link listing?
If set to 'Yes' then a new browser window will be opened when clicked on any search result.
Text when no matches or search results found:
When a visitor searches for something and no match has been found, then this text will be displayed.
Minimum characters in keywords that is allowed when specifying keywords to search for:
If you have for example 10 000 pages indexed and some one searches for 'e' then 8000 search results would likely be returned. This setting enables you to supply a number where a keyword has to have at least this number of characters before a search will be done.
'Next Page' Text:
This is the name of the 'Next Page' hyperlink that users can click on to navigate through the search result pages.
'Previous Page' Text:
This is the name of the 'Previous Page' hyperlink that users can click on to navigate through the search result pages.
MySQL Settings (Pro Version Only)
The setting of using default SQL or Full Text Searching is only available if you use Mysql.
Default SQL is the default SQL search syntax that will be used when searching.
Full Text Searching is where the 'Full Text Searching' feature of Mysql will be used to search. More information on Full Text Searching is available on the web site of Mysql.
2.3 What to Search
When in the control panel and clicking on the 'What to Search' tab, you can choose or select sub directories in your public HTML directory that you would like FM SiteSearch to search through. Note that if you do not have sub directories in your public HTML directory, then you will only be able to select your Public HTML directory to be searchable.
The idea behind html templates is that you can edit all HTML code so that the look and feel of your search engine can have the look and feel you want it to have. You may copy and paste the html code of the templates into your web editor, to edit all aspects of it.
You may also open the .html files (template files) in your web editor and edit it. The templates being used is all .html files situated in your 'data' directory. The 'data' directory is explained in the installation instructions.
Please keep the words enclosed by double exclamation marks in tact. These are variable words that is replaced by data or text that varies.
2.5 Building a Search Index (Pro Version Only)
If you have chosen to run a search engine that makes use of a search index then you will have to build a search index before any searches can be performed. Using a search index ensures maximum search performance/speed.
The setting of using a search index or not is available when you click on the 'search settings' tab in the control panel. If you use Mysql, then this setting has no effect and a search index will automatically be used.
Building a search index from the control panel, requires that you click the 'Build Search Index Tab' from the control panel.
You may also build a search index from SSH. To do this, SSH into your host/server and go to the directory that holds the .cgi script files.
If you do not use Mysql execute fms_admin3.cgi from SSH. This is done by issuing the following on the command prompt:
If you use Mysql execute fms_admin4.cgi from SSH. This is done by issuing the following on the command prompt:
If you would like to use cron to build a search index on a scheduled basis, please see:
2.9 How to use the unix cron program to build a search index
2.6 Search HTML Code
You can get the HTML code of search boxes to place on your web site by clicking the 'HTML code' tab in the control panel.
2.7 Specialized Searches (Pro Version Only)
You can create special searches where only specified sub directories in your public HTML directory will be searched. This can be handy if you want visitors to be able to search through a specific section of your web site.
To implement specialized searches, go to the control panel and click the 'HTML code' tab. Copy and paste the HTML code out of the 'Specialized search' box into your web editor. You will see a drop down box. This box contains all the sub directories that you have chosen to be searched through. You can remove any of these sub directory items in the box. Rename the names displayed in the drop down box to more suitable names for the directories that you would like choosable when users want to perform a specialized search. Keep the values of the name items in the drop down box in tact.
2.8 Search Statistics (Pro Version Only)
It's always good to know what users are looking for when searching your web site. By knowing what users search for most, you will always have a good idea on how to enhance the navigation of your web site. In most instances it will also enable you to make your site more interesting by serving the most looked for content first.
The search statistics enable you to see exactly what users are looking for and the most searched for terms. The search statistics also comes with accompanying graphs.
2.9 How to use the unix cron program to build a search index (Pro Version Only)
Let's say that you have a large web site that you would like searched (more than 100/200 pages) and you would like a search index built on a daily basis. In order to do this you will need to use the cron program available on most unix/linux based systems. Most web hosts will also provide you with access to this program. Getting access to cron will mostly be cheap if there is any additional charge for this.
Note that if you use Mysql that you will need to execute fms_admin4.cgi to build a search index. If you do not use Mysql then you will need to execute fms_admin3.cgi to build a search index.
Note that you cannot just execute fms_admin4.cgi/fms_admin3.cgi with cron. The reason for this is that fms_admin4.cgi/fms_admin3.cgi needs the working directory to be the directory in which it resides.
To make the directory in which fms_admin4.cgi/fms_admin3.cgi resides in, the working directory, you can create a Unix shell script, (Almost like a dos batch file) which executes fms_admin4.cgi/fms_admin3.cgi
The creation of the shell script file should be simple. Note that you will have to make this script file executable by using chmod 755 yourscript - You will also have to save this script file in unix file format. Use Textpad (textpad.com) to save the script file in unix file format.
The shell script should look something like this: (This is the file that CRON will execute)
The example below executes fms_admin4.cgi as an example. If you do not use Mysql then the example below will need to be replaced with fms_admin3.cgi
### START OF SHELL SCRIPT
cd /home/yourdomain/www/cgi-bin/fmsearch ### Change to admin4.cgi's working dir
perl fms_admin4.cgi ### Execute admin4.cgi
### END OF SHELL SCRIPT
Overview of how cron and fms_admin4.cgi would work
Create a unix shell script that executes fms_admin4.cgi or fms_admin3.cgi - You can create this file on your hosting server or in windows. If created in windows ftp it to your hosting account where the Unix Cron program can execute it.
Configure cron to execute the shell script you have created, on the scheduled intervals you specify