1Lucy::Search::PolyQueryU(s3e)r Contributed Perl DocumentaLtuicoyn::Search::PolyQuery(3)
2
3
4
6 Lucy::Search::PolyQuery - Base class for composite Query objects.
7
9 sub walk {
10 my $query = shift;
11 if ( $query->isa("Lucy::Search::PolyQuery") ) {
12 if ( $query->isa("Lucy::Search::ORQuery") ) { ... }
13 elsif ( $query->isa("Lucy::Search::ANDQuery") ) { ... }
14 elsif ( $query->isa("Lucy::Search::RequiredOptionalQuery") ) {
15 ...
16 }
17 elsif ( $query->isa("Lucy::Search::NOTQuery") ) { ... }
18 }
19 else { ... }
20 }
21
23 PolyQuery serves as a shared base class for ANDQuery, ORQuery,
24 NOTQuery, and RequiredOptionalQuery. All of these classes may serve as
25 nodes in composite Query with a tree structure which may be walked.
26
28 add_child
29 $poly_query->add_child($query);
30
31 Add a child Query node.
32
34 Lucy::Search::PolyQuery isa Lucy::Search::Query isa Clownfish::Obj.
35
36
37
38perl v5.30.0 2019-07-26 Lucy::Search::PolyQuery(3)