SavillTechDownload areaServicesProductsLinksSearch

line Java Search Product Page

Java Search is a Java written search engine and as such can be run on any client that has a Java virtual machine. 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.


This Search Applet is freeware and can be used on any site. The applet lets the user enter a number of words and then searches a structured file for those words and then displays relevant titles in the lower choice box. By selecting one of these and clicking the Goto Question button (this text can be changed by passing the label as a parameter to the applet) the applet automatically links the user to the required page.

Every part of text is now fully configurable meaning the engine can be used or any language site.

Recent Updates

Version 3.3 - Fixed a problem where +word* does not always display answer.

Version 3.2 - Fixed the problem where word* does not always show the answer.

How to include the Search Engine on a site

  1. Download the SearchEngine.class file which is contained in a zip file
  2. Extract to a directory
  3. Put the following into the HTML page you wish to contain the Applet

    <p><applet code="SearchApplet.class" align="baseline" width="450" height="120" name="SearchApplet">
    <param name="location" value="">
    <param name="linkbutton" value="Goto Answer">
    <param name="dataloc" value="">
    <param name="panelname" value="answer">
    <param name="helploc" value="">

    The parameters are optional and are described in the features section, and if none are entered it will look for data.txt in the same place as the applet and the button will say "Goto Link".
  4. Create your database file which will be read in by the applet, again this structure is defined in the features section.
  5. Save this file in the location as defined by the parameter name "dataloc"


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

From the list of answers select one and then click "goto question"


  • 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*
  • Use the scroll bar to select how many answers to display
  • Ability to pass applet the location where to find the main location of files as parameter "location". The link defined in the codewords area is then appended to it, e.g. as a parameter named location, the code in the html file would be
    <param name="location" value="">
    If the link then was sysconf.html#sysconf22 it would link to http:\\\ntfaq\sysconf.html#sysconf22.
    If this parameter does not exist then the applet will just use getDocumentBase() and look for files in the same area as the page.
  • Data is read in from file data.txt which is searched for in the location of the HTML file that contains the applet (getDocumentBase()). This can also be passed as the "dataloc" parameter.
    The format of the files should be plain text with the following format, the | character is used to separate entries
    <the link>|<the title to be displayed>|<codeword 1>|<codeword 2>|etc. (no | at end, only newline), e.g.

    datastor.html#newprod|Exciting new Datastore Product|datastore|new|product
  • You can also pass the text to be displayed on the "Goto Question" button, by passing parameter "linkbutton", e.g.
    <param name="linkbutton" value="Goto Answer">
  • You can pass the panel to be updated with link if used in a frame page, by passing the parameter "panelname" with the name of the target frame, e.g.
    <param name="panelname" value="main">
  • You can pass the link for the help button as the "helploc" parameter, it must include the http:, e.g.
    <param name="helploc" value="">
  • All buttons and text on the applet can now be configured by passing certain parameters. Below is a table summarizing these
Parameter What is sets
location The location that the links in the data file are appended to, e.g.
dataloc Name of the data file. If not specified will look for data.txt in the documentbase (where the page resides)
linkbutton The text that is displayed on the "Goto" button
searchbutton Text displayed on the "Search" button
helpbutton Text displayed on the "Help" button
displaytext Test displayed next to the number of display, e.g. "Display xx"
foundtext Text displayed next to the slider to specify how many items to return
enterquery The default text shown in the query box
panelname Panel to update if used in a frame
helploc Location of the help file when "Help" button is clicked.


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 HTML file was in the same area, the code would be

<p><applet code="SearchApplet.class" align="baseline" width="450" height="120" name="SearchApplet">
<param name="location" value="">
<param name="linkbutton" value="Goto Link">
<param name="dataloc" value="">

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 Applet in action can be seen at The database this uses is very large and hence may take a while to load.

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