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.
Version 3.3 - Fixed a problem where +word* does not always display
Version 3.2 - Fixed the problem where word* does not always show the
How to include the Search Engine on a site
- Download the
file which is contained in a zip file
- Extract to a directory
- Put the following into the HTML page you
wish to contain the Applet
align="baseline" width="450" height="120"
<param name="linkbutton" value="Goto Answer">
<param name="panelname" value="answer">
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
- Create your database file which will be read
in by the applet, again this structure is defined in the features section.
- 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
- 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.
- 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.
http://www.savilltech.com/ntfaq as a parameter named location, the code in the
html file would be
If the link then was sysconf.html#sysconf22 it
would link to
If this parameter does not exist then the applet
will just use getDocumentBase() and look for files in the same area as the
- 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"
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
- You can also pass the text to be displayed
on the "Goto Question" button, by passing parameter
<param name="linkbutton" value="Goto
- 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.
- All buttons and text on the applet can now
be configured by passing certain parameters. Below is a table summarizing
that the links in the data file are appended to, e.g.
||Name of the
data file. If not specified will look for data.txt in the documentbase (where
the page resides)
||The text that
is displayed on the "Goto" button
on the "Search" button
on the "Help" button
next to the number of display, e.g. "Display xx"
next to the slider to specify how many items to return
text shown in the query box
update if used in a frame
the help file when "Help" button is clicked.
If your base site was http://www.yourdomain.com 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
- History of the company
- http://www.yourdomain.com/products.html -
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
this file was stored in http://www.yourdomain.com/search/data.inf, and the HTML
file was in the same area, the code would be
align="baseline" width="450" height="120"
<param name="linkbutton" value="Goto Link">
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
wish to discuss licensing the search engine in a product and/or require an
custom changes (logo etc.) please mail firstname.lastname@example.org. A number of
companies are already using the search engine in commerical products with
custom written changes.