Lucy::Search::PolyQuery - Base class for composite Query objects.
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 { ... } }
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.
$poly_query->add_child($query);
Add a child Query node.
Lucy::Search::PolyQuery isa Lucy::Search::Query isa Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.