NAME

HTML::Index::Search::CGI - CGI interface to the HTML::Index::Search module for searching HTML::Index inverted indexes.

SYNOPSIS

my $searcher = HTML::Index::Search->new( DB_DIR => "/path/to/your/db" );
my %form_data = CGI::Lite->parse_form_data();
my $cgi = HTML::Index::Search::CGI->new(
    SEARCH              => $searcher,
    TEMPLATE_FILE       => '/path/to/your/template/file.tmpl',
    DOCROOT             => '/path/to/your/html/document/root',
    %form_data
);
print "Content-Type: text/html\n\n", $cgi->search_results_page();

DESCRIPTION

This module provides a CGI interface to the HTML::Index::Search functionality. Its constructor is called with the following options as a hash:

A HTML::Index::Search object.

TEMPLATE_FILE

An HTML::Template template file, which contains variables for the search results and form parameters. See the eg/simple.tmpl for a sample template file.

DOCROOT

The document root for the pages returned from the inverted index by theHTML::Index::Search object. This is pre-prended to the URLs of these pages in the results pages.

The remainder of the options hash should contain the form data, as returned from a call to CGI::Lite->parse_form_data(), or some such.

SEE ALSO

HTML::Index

AUTHOR

Ave Wrigley <Ave.Wrigley@itn.co.uk>

COPYRIGHT

Copyright (c) 2001 Ave Wrigley. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.