Nick Wellnhofer > Lucy > Lucy::Search::ORQuery

Download:
Lucy-0.5.1.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.005001   Source  

NAME ^

Lucy::Search::ORQuery - Union multiple result sets.

SYNOPSIS ^

    my $foo_or_bar_query = Lucy::Search::ORQuery->new(
        children => [ $foo_query, $bar_query ],
    );
    my $hits = $searcher->hits( query => $foo_or_bar_query );
    ...

DESCRIPTION ^

ORQuery is a composite Query which matches when any of its children match, so its result set is the union of their result sets. Matching documents recieve a summed score from all matching child Queries.

CONSTRUCTORS ^

new

    my $foo_or_bar_query = Lucy::Search::ORQuery->new(
        children => [ $foo_query, $bar_query ],
    );

Create a new ORQuery.

METHODS ^

make_compiler

    my $compiler = $or_query->make_compiler(
        searcher    => $searcher     # required
        boost       => $boost        # required
        subordinate => $subordinate  # default: false
    );

Abstract factory method returning a Compiler derived from this Query.

INHERITANCE ^

Lucy::Search::ORQuery isa Lucy::Search::PolyQuery isa Lucy::Search::Query isa Clownfish::Obj.

syntax highlighting: