1Lucy::Search::NOTQuery(U3s)er Contributed Perl DocumentatLiuocny::Search::NOTQuery(3)
2
3
4

NAME

6       Lucy::Search::NOTQuery - Invert the result set of another Query.
7

SYNOPSIS

9           my $not_bar_query = Lucy::Search::NOTQuery->new(
10               negated_query => $bar_query,
11           );
12           my $foo_and_not_bar_query = Lucy::Search::ANDQuery->new(
13               children => [ $foo_query, $not_bar_query ].
14           );
15           my $hits = $searcher->hits( query => $foo_and_not_bar_query );
16           ...
17

DESCRIPTION

19       A NOTQuery wraps another Query and matches against its inverse document
20       set.  All matching docs recieve a score of 0.0.
21
22       NOTQuery is often used in conjunction with ANDQuery to provide Xa AND
23       NOT bX semantics.
24

CONSTRUCTORS

26   new
27           my $not_query = Lucy::Search::NOTQuery->new(
28               negated_query => $query,
29           );
30
31       Create a new NOTQuery.
32
33       ·   negated_query - The Query whose result set should be inverted.
34

METHODS

36   get_negated_query
37           my $query = $not_query->get_negated_query();
38
39       Accessor for the objectXs negated query.
40
41   set_negated_query
42           $not_query->set_negated_query($negated_query);
43
44       Setter for the objectXs negated query.
45
46   make_compiler
47           my $compiler = $not_query->make_compiler(
48               searcher    => $searcher,     # required
49               boost       => $boost,        # required
50               subordinate => $subordinate,  # default: false
51           );
52
53       Abstract factory method returning a Compiler derived from this Query.
54
55       ·   searcher - A Searcher.
56
57       ·   boost - A scoring multiplier.
58
59       ·   subordinate - Indicates whether the Query is a subquery (as opposed
60           to a top-level query).  If false, the implementation must invoke
61           normalize() on the newly minted Compiler object before returning
62           it.
63

INHERITANCE

65       Lucy::Search::NOTQuery isa Lucy::Search::PolyQuery isa
66       Lucy::Search::Query isa Clownfish::Obj.
67
68
69
70perl v5.30.1                      2020-01-30         Lucy::Search::NOTQuery(3)
Impressum