WebSearch Documentation
THE PERL SCRIPTS ARE NO LONGER BEEING SUPPORTED - PLEASE GO TO TETRABB.COM FOR THE NEWEST VERSION OF THE WEBBBS FORUMWebSearch allows users to search for key words in documents located on
your Web site. It searches the basic text of the documents, as well
as ALT text and any information contained in META “keywords” and
“description” tags. The script scores the match URLs based upon the
frequency with which the requested key terms appear in the documents,
and also lists the date on which each file was last modified. You can
easily configure the number of matches which will be displayed on
each results page.
GENERAL NOTES:
Depending upon how you configure it, WebSearch will either construct
a “search index” which it will reference when searches are conducted,
or it will actually open and read all the relevant files to find keyword
matches.
Using a search index, of course, offers a tremendous advantage in terms
of speed and efficiency. However, the rather simple nature of the index
*does* impose a few limits on the search options available to your
visitors: they won’t be able to perform case-sensitive searches, and the
listing of results will include no “relevance” information, but will be
arranged simply by the documents’ “last modified” dates. (“Live”
searches score the match URLs based upon the frequency with which
the requested keywords appear in the documents.)
Conducting “live” searches of your files means that the search results
will always be “up-to-the-minute” accurate. However, of course, it
also means that the searches are less efficient. As a result, this
option should only be used if you’re working with relatively small file
set.
WebSearch searches the basic text of your documents, as well as ALT
text and any information contained in META “keywords” and “description”
tags. It does *not* search HTML tags or comments, so, for example, a
search for “HTML” won’t key on every “A HREF” tag.
Once you’ve configured the script, you should call it directly (either
by referencing its URL directly in your browser, or from the telnet
command line). Doing so will accomplish three things.
First, the script will display for you a list of the directories it’s
been set to search, all the files from those directories which will
be included in its searches, and all the (text, not graphics!) files
from those directories which will be specifically *excluded* from its
searches. This allows you to easily confirm that the searches will
include all the files you want included, and that they *won’t* include
any files you *don’t* want included.
Second, if you’ve opted to utilize a search index, calling the script
directly will *create* (or recreate) that index for you.
Third, in addition to the list of files, the script will also provide
you with a sample search form, and with HTML code to copy to your
pages to allow you to add search forms to your site.
The script, of course, must be called from a search form on a Web page.
The exact structure of the form is not too important, so you’re welcome
to modify the code provided to suit your own purposes, so long as the
correct fields and options exist. If you leave out the “boolean” and
“case” fields, the script will default to a case-insensitive boolean
“OR” (“any terms”) search. If you leave out the “hits” field, the
script will default to showing 25 matches per output page. The “terms”
field, of course, is essential, since it’s in that field that your
visitors will input their keywords!
(It’s also possible to create “pre-defined” searches, by linking to
the script with certain information in the QUERY_STRING of the links.
Linking, for example, to “websearch.pl?terms=mexico+city&boolean=all”
will return a results page just as if a visitor had conduced an
“all of the terms” search for “mexico city”; similarly, linking to
“websearch.pl?terms=nebraska+iowa” will return a results page
just as if a visitor had searched for “nebraska iowa” and specified
that results pages should contain any, but not necessarily all, of
the terms.)
Recent Comments