NAME

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

VERSION

0.05

SYNOPSIS

use KSx::Search::WildCardQuery
my $query = new KSx::Search::WildCardQuery
    term  => 'foo*',
    field => 'content',
;

$searcher->search($query);
# etc.

DESCRIPTION

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.).

PERFORMANCE

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.

METHODS

new

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

PREREQUISITES

Hash::Util::FieldHash::Compat

The development version of KinoSearch available at http://www.rectangular.com/svn/kinosearch/trunk, revision 4810 or higher.

AUTHOR & COPYRIGHT

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.

SEE ALSO

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