NAME
Search::Query::Dialect::KSx::WildcardQuery - KinoSearch query extension
SYNOPSIS
my $query = Search::Query->parser( dialect => 'KSx' )->parse('foo*');
my $ks_query = $query->as_ks_query();
# $ks_query isa WildcardQuery
DESCRIPTION
Search::Query::Dialect::KSx::WildcardQuery extends the KinoSearch::QueryParser syntax to support wildcards. This code is similar to the sample PrefixQuery code in the KinoSearch distribution and the KSx::Search::WildCardQuery module on CPAN.
METHODS
This class is a subclass of KinoSearch::Search::Query. Only new or overridden methods are documented here.
new( args )
Create a new WildcardQuery object. args must contain key/value pairs for field
and term
.
get_term
get_field
Retrieve the value set in new().
get_regex
Retrieve the qr// object representing term.
get_prefix
Retrieve the literal string (if any) that precedes the wildcards in term.
get_suffix
Retrieve the literal string (if any) that follows the wildcards in term.
equals
Returns true (1) if the object represents the same kind of query clause as another WildcardQuery.
NOTE: Currently a NOTWildcardQuery and a WildcardQuery object will evaluate as equal if they have the same terma and field. This is a bug.
to_string
Returns the query clause the object represents.
make_compiler
Returns a Search::Query::Dialect::KSx::WildcardCompiler object.
AUTHOR
Peter Karman, <karman at cpan.org>
BUGS
Please report any bugs or feature requests to bug-search-query-dialect-ksx at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Search-Query-Dialect-KSx. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Search::Query::Dialect::KSx
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Search-Query-Dialect-KSx
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Based on the sample PrefixQuery code in the KinoSearch distribution.
COPYRIGHT & LICENSE
Copyright 2010 Peter Karman.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.