
KSx::Search::WildCardQuery - Wild card query class for KinoSearch

0.05

use KSx::Search::WildCardQuery
my $query = new KSx::Search::WildCardQuery
term => 'foo*',
field => 'content',
;
$searcher->search($query);
# etc.

This module provides search query objects for KinoSearch that perform wild-card searches. Currently, asterisks (*) are the only wild cards supported. An asterisks represents zero or more characters. This is a subclass of KSx::Search::RegexpTermQuery (q.v.).

If a term begins with literal (non-wild-card) characters (e.g., the foo in foo*), 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., *foo*), the entire index will be scanned, so beware.

This is the constructor. It constructs. Call it with hash-style arguments as shown in the "SYNOPSIS".

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.

KinoSearch, KinoSearch::Search::Query, KSx::Search::RegexpTermQuery, KinoSearch::Docs::Cookbook::CustomQuery