SavillTechDownload areaServicesProductsLinksSearch

line CGI Search Product Page

CGI Search is a C++ written search engine that can be run on NT or Unix web servers to service client search requests. It works by a keyword definition file being created and then matches on words the user entered. This can be better than a full text search as it lets the administrator define certain criteria.

The CGI program should be installed on the relevant directory on your server and then a form setup on a web page that is used to pass the user query to the CGI program.

The Search engine is fully configurable as discussed later in this page.

How to include the Search Engine on a site

  1. Download the CGI Program file which is contained in a zip file. Currently 2 versions are available for download:
    ntsearch.exe - which can be used on NT based systems
    unixsearch.exe - for unix based systems
    Once downloaded make sure you rename the files to .cgi, e.g. ntsearch.cgi.
  2. Store to the relevant directory, usually cgi-bin
  3. Put the following into the HTML page you wish to contain the Applet
    <FORM ACTION="ntsearch.cgi" METHOD="GET">
    <INPUT TYPE="text" SIZE="80" NAME="data">
    <INPUT TYPE="submit" VALUE="Search">
  4. You now need to create the parameter file which must be called ntsearch.cfg (even if its the unix version) which must be in the same directory as the CGI program and should contain the following:
    backtext:main page
    titlestr:Windows NT FAQ Search Results

    These parameters are defined in the table below
  5. Create your database file which will be read in by the applet, again this structure is defined in the features section. The format is exactly the same as the Java sister search applet so you can easily switch.
  6. Save this file in the location as defined by the parameter name "data"


CGI Search Help

Input your question in the query box and then click search. Do not use a question mark.

A HTML page will then be returned with links to all your answers


  • You can add a + to search words, to force the answer to contain the word, e.g.
    convert +fat to +ntfs
  • Use a wildcard at end of word, e.g.
    install serv*
  • All buttons and text on the applet can now be configured by completing the data in the ntsearch.cfg file. Below is a table summarizing these
Parameter What is sets
baseloc The location that the links in the data file are appended to, e.g.
data Name of the data file. If not specified will look for data.txt in the location of the CGI program
background Background Image shown on returned page
backto A link to the "back to" displayed at the end of the returned search
backtext The text to be displayed as the return to, this is partnered with backto.
titlestr The title of the returned HTML page


If your base site was and all documents/links were under this site, the base location for the applet would be

For this example, lets say there are only 3 pages to link to as follows:

  • - History of the company
  • - Products of the company (diskfast)
  • - John Savill

The keywords for each of the 3 were as follows

  • history introduction yourdomain
  • products diskfast
  • john savill

Your data file would be the following

info/history.html|History of the company|history|introduction|yourdomain
products.html|Products of the company|products|product|diskfast
staff/savillj.html|John Savill|john|savill

Assume this file was stored in, and the ntsearch.cfg file would be

backtext:main page
titlestr:Your Domains Search Results

If you wanted to link to different sites, you would set the location parameter as just "http://" and in the data file the links you be in the format

An example of the Search Engine in action can be seen at

Contact Information

If you wish to discuss licensing the search engine in a product and/or require an custom changes (logo etc.) please mail A number of companies are already using the search engine in commerical products with custom written changes.

Last Update: Friday, December 28, 1998
Copyright ©1998 SavillTech Ltd. All rights reserved. Terms of use