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


KSx-Search-WildCardQuery documentation  | view source Contained in the KSx-Search-WildCardQuery distribution.

Index


NAME

Top

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

VERSION

Top

0.05

SYNOPSIS

Top

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

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

DESCRIPTION

Top

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.)|KSx::Search::RegexpTermQuery.

PERFORMANCE

Top

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

Top

new

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

PREREQUISITES

Top

Hash::Util::FieldHash::Compat

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

AUTHOR & COPYRIGHT

Top

SEE ALSO

Top

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


KSx-Search-WildCardQuery documentation  | view source Contained in the KSx-Search-WildCardQuery distribution.