Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Attaching the CGI

The CGI search is implemented using 2 Perl script CGI files.

  • search_form.cgi - is the page that contains the actual search page and should be loaded into the TOC frame when the Search link is selected in the TAB frame.
  • search_index.cgi - is the page that indexes the HTML files once they have been loaded to the web server.

Note: Both these files are "freeware". The scripts were originally developed by Christian Neuss (ice@isa.informatik.th-darmstadt.de) in September 1998, and were later modified by Chris Samaritoni in Jan 1999, then by us in September 2001. We do not claim any ownership of these scripts, they are distributed as examples only.

Because you want each Author-it book to be indexed independently of the others, and because CGI script usually execute in one location on a server you need to be able to specify a parameter to define which Author-it Book you want to search.

Both of these files accept the command line parameter SEARCHDIR. This parameter specifies the folder containing the Author-it published book on the server.

Steps to Create the CGI Full Text Search

  1. Set up Author-it to produce a Book configured for the CGI FTS as described in How it is Setup.
  2. Upload the search_form.cgi and search_index.cgi files to your cgi-bin folder (or equivalent) on your web server. These should be set to read, executable, but you may want search_index.cgi protected to prevent outsiders from reindexing your books.

    Note: Your web server must support Perl CGI scripts.

  3. Modify the tab_toc.htm, and tab_index.htm files to link to the cgi-bin folder on your web server and change the SEARCHDIR= parameter to point to the web server folder your Author-it book will be published in. The default is cgi-bin/search_form.cgi?SEARCHDIR=tripane.

    Note: You may want to rename and save these changed files. If you do, make sure that the new files are referenced in the HTML Additional Files property of your Author-it Book object.

  4. Publish the Author-it Book and upload all the files in the Publishing folder to your web server.
  5. Next you need to run search_index.cgi to index your uploaded HTML files. This will need to be done each time you change the HTML files. Assuming that your domain is www.mydomain.com, your cgi-bin folder on your web server is cgi-bin, and that the folder you placed your published Author-it Book on your web server is myfolder, then you would enter the following URL in your browser:

    http://www.mydomain.com/cgi-bin/search_index.cgi?SEARCHDIR=myfolder

    Progress is displayed as the script indexes your Author-it published HTML. Once complete the file search.idx is created in the same folder as your Author-it published HTML.

Now you should be able to open your Author-it published HTML in your browser and try some full text searches. It supports full boolean expressions.

  • You can use "and" (default) and "or" with search terms.
  • Write umlauts like Ä as Ae, ...

    Examples:

    • "cat and mouse" - or simply "cat mouse"
    • "(cat or mouse) and not dog"
    • "cat or mouse"
    • "not" operates only within the set of files containing at least one of "cat", "mouse" or "dog".

See Also

Using a Server Side (CGI Script) Full Text Search

How the Server Side Search is Setup

Customizing the CGI Scripts

Using your Own Full Text Search

Top of Page Email this Page Log Support Call Send Feedback Print