David E. Wheeler > Lucy-0.2.2 > Lucy::Search::PolyQuery

Download:
Lucy-0.2.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Lucy-0.3.3

NAME ^

Lucy::Search::PolyQuery - Base class for composite Query objects.

SYNOPSIS ^

    sub walk {
        my $query = shift;
        if ( $query->isa("Lucy::Search::PolyQuery") ) {
            if    ( $query->isa("Lucy::Search::ORQuery") )  { ... }
            elsif ( $query->isa("Lucy::Search::ANDQuery") ) { ... }
            elsif ( $query->isa("Lucy::Search::RequiredOptionalQuery") ) {
                ...
            }
            elsif ( $query->isa("Lucy::Search::NOTQuery") ) { ... }
        }
        else { ... }
    }

DESCRIPTION ^

PolyQuery serves as a shared base class for ANDQuery, ORQuery, NOTQuery, and RequiredOptionalQuery. All of these classes may serve as nodes in composite Query with a tree structure which may be walked.

INHERITANCE ^

Lucy::Search::PolyQuery isa Lucy::Search::Query isa Lucy::Object::Obj.

syntax highlighting: