1Lucy::Search::ORQuery(3U)ser Contributed Perl DocumentatiLouncy::Search::ORQuery(3)
2
3
4
6 Lucy::Search::ORQuery - Union multiple result sets.
7
9 my $foo_or_bar_query = Lucy::Search::ORQuery->new(
10 children => [ $foo_query, $bar_query ],
11 );
12 my $hits = $searcher->hits( query => $foo_or_bar_query );
13 ...
14
16 ORQuery is a composite Query which matches when any of its children
17 match, so its result set is the union of their result sets. Matching
18 documents recieve a summed score from all matching child Queries.
19
21 new
22 my $foo_or_bar_query = Lucy::Search::ORQuery->new(
23 children => [ $foo_query, $bar_query ],
24 );
25
26 Create a new ORQuery.
27
28 • children - An array of child Queries.
29
31 make_compiler
32 my $compiler = $or_query->make_compiler(
33 searcher => $searcher, # required
34 boost => $boost, # required
35 subordinate => $subordinate, # default: false
36 );
37
38 Abstract factory method returning a Compiler derived from this Query.
39
40 • searcher - A Searcher.
41
42 • boost - A scoring multiplier.
43
44 • subordinate - Indicates whether the Query is a subquery (as opposed
45 to a top-level query). If false, the implementation must invoke
46 normalize() on the newly minted Compiler object before returning
47 it.
48
50 Lucy::Search::ORQuery isa Lucy::Search::PolyQuery isa
51 Lucy::Search::Query isa Clownfish::Obj.
52
53
54
55perl v5.32.1 2021-01-27 Lucy::Search::ORQuery(3)