LucyX::Search::WildcardQuery - Lucy query extension
my $query = LucyX::Search::WildcardQuery->new( term => 'green*', field => 'color', ); my $hits = $searcher->hits( query => $query );
LucyX::Search::WildcardQuery extends the Lucy::QueryParser syntax to support wildcards. This code is similar to the sample PrefixQuery code in the Lucy distribution and the KinoSearch::Search::WildCardQuery and Search::Query::Dialect::KSx::WildcardQuery module on CPAN.
This class is a subclass of Lucy::Search::Query. Only new or overridden methods are documented here.
Create a new WildcardQuery object. args must contain key/value pairs for field and term.
field
term
Retrieve the value set in new().
Retrieve the qr// object representing term.
Retrieve the literal string (if any) that precedes the wildcards in term.
Retrieve the literal string (if any) that follows the wildcards in term.
Push term onto the stack of lexicon terms that this Query matches.
Returns array ref of terms in the lexicons that this query matches.
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.
Returns the query clause the object represents.
Returns a LucyX::Search::WildcardCompiler object.
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Please report any bugs or feature requests to bug-lucyx-search-wildcardquery at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LucyX-Search-WildcardQuery. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-lucyx-search-wildcardquery at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc LucyX::Search::WildcardQuery
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=LucyX-Search-WildcardQuery
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/LucyX-Search-WildcardQuery
CPAN Ratings
http://cpanratings.perl.org/d/LucyX-Search-WildcardQuery
Search CPAN
http://search.cpan.org/dist/LucyX-Search-WildcardQuery/
Copyright 2011 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.
To install LucyX::Search::WildcardQuery, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LucyX::Search::WildcardQuery
CPAN shell
perl -MCPAN -e shell install LucyX::Search::WildcardQuery
For more information on module installation, please visit the detailed CPAN module installation guide.