|
Apache::Wyrd::Services::SearchParser - Object for performing logical word-searches |
Apache::Wyrd::Services::SearchParser - Object for performing logical word-searches
use Apache::Wyrd::Services::SearchParser;
sub key {'key'};
sub search {
.....
}
my $parser = Apache::Wyrd::Services::SearchParser->new($self);
return $parser->parse('(search AND word) OR (web NOT page)');
Allows for logical parsing of a search using AND, OR, NOT and DIFF
keywords. Designed to work with Apache::Wyrd::Services::Index, but
can work with another search object. Note that these keywords MUST be
in upper-case to parse, otherwise they will be interpreted as the
literal words.
Any search object using the parser should implement a search() method
which does a word search against an index, returning an array of hashes.
(format: (returns) name (arguments after self))
new (objectref)parse will call it's search and
key methods.
parse (scalar, array)search method of the calling object.
Returns an array of results derived from recursively calling search
and joining the results based on the logical operators.
UNKNOWN
Barry King <wyrd@nospam.wyrdwright.com>
Copyright 2002-2004 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
|
Apache::Wyrd::Services::SearchParser - Object for performing logical word-searches |