NAME
OpenGuides::SuperSearch - Search form generation and processing for OpenGuides.
DESCRIPTION
Does search stuff for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers.
SYNOPSIS
use CGI;
use Config::Tiny;
use OpenGuides::SuperSearch;
my $config = Config::Tiny->read( "wiki.conf" );
my $search = OpenGuides::SuperSearch->new( config => $config );
my %vars = CGI::Vars();
$search->run( vars => \%vars );
METHODS
- new
-
my $config = Config::Tiny->read( "wiki.conf" ); my $search = OpenGuides::SuperSearch->new( config => $config );
- run
-
my %vars = CGI::Vars(); $search->run( vars => \%vars, return_output => 1, # defaults to 0 return_tt_vars => 1, # defaults to 0 );
The
return_output
parameter is optional. If supplied and true, the stuff that would normally be printed to STDOUT will be returned as a string instead.The
return_tt_vars
parameter is also optional. If supplied and true, the template is not processed and the variables that would have been passed to it are returned as a hash. This parameter takes precedence overreturn_output
.These two parameters exist to make testing easier; you probably don't want to use them in production.
INPUT
- word
-
Unquoted single words will be matched as-is. They are allowed to contain the wildcards
*
and%
. For example, a search onescalator
will return all pages containing the word "escalator".
- AND searches
-
Clauses joined with ampersands (
&
), for example:restaurant&vegetarian
will return all pages containing both the word "restaurant" and the word "vegetarian".
- OR searches
-
Clauses joined with pipes (
|
), for example:restaurant|cafe
will return all pages containing either the word "restaurant" or the word "cafe".
- NOT searches
-
Clauses preceded by exclamation marks (
!
), for example:!expensive
will return all pages that do not contain the word "expensive".
- phrase searches
-
Enclose phrases in double quotes, for example:
"meat pie"
will return all pages that contain the exact phrase "meat pie" - not pages that only contain, for example, "apple pie and meat sausage".
AUTHOR
The OpenGuides Project (openguides-dev@openguides.org)
COPYRIGHT
Copyright (C) 2003 The OpenGuides Project. All Rights Reserved.
The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 521:
You forgot a '=back' before '=head1'