KSx::Search::RegexpTermQuery - Regular expression term query class for KinoSearch
0.05
use KSx::Search::RegexpTermQuery my $query = new KSx::Search::RegexpTermQuery regexp => qr/^foo/, field => 'content', ; $searcher->hits($query); # etc.
This module provides search query objects for KinoSearch that find terms that match a particular regular expression. Note that a query will only match a single term; it is not a regexp match against an entire field.
If a regular expression has a fixed literal prefix anchored to the beginning of the string (e.g., the foo in qr/^foo[dl]$/), only the 'foo' words in the index will be scanned, so this should not be too slow, as long as the prefix is fairly long, or there are sufficiently few 'foo' words. If, however, there is no literal prefix (e.g., qr/foo/), the entire index will be scanned, so beware.
foo
qr/^foo[dl]$/
qr/foo/
This is the constructor. It constructs. Call it with hash-style arguments as shown in the "SYNOPSIS". The regexp can be a qr// thingy or a string.
regexp
qr//
Hash::Util::FieldHash::Compat
The development version of KinoSearch available at http://www.rectangular.com/svn/kinosearch/trunk, revision 4810 or higher.
Copyright (C) 2008-9 Father Chrysostomos <sprout at, um, cpan.org>
This program is free software; you may redistribute or modify it (or both) under the same terms as perl.
Much of the code in this module was plagiarized from Marvin Humphrey's KinoSearch modules.
KinoSearch, KinoSearch::Search::Query, KSx::Search::WildCardQuery
To install KSx::Search::WildCardQuery, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KSx::Search::WildCardQuery
CPAN shell
perl -MCPAN -e shell install KSx::Search::WildCardQuery
For more information on module installation, please visit the detailed CPAN module installation guide.