This file is indexed.

/usr/share/perl5/Search/GIN/Query/Set.pm is in libsearch-gin-perl 0.11-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
use strict;
use warnings;
package Search::GIN::Query::Set;
# ABSTRACT: Create queries with set operations

our $VERSION = '0.11';

use Moose;
use namespace::autoclean;

with qw(
    Search::GIN::Query
);

use constant 'method' => 'set';
use constant 'has_method' => 1;

has operation => (
    isa     => 'Str',
    is      => 'ro',
    default => 'UNION'
);

has subqueries => (
    isa => "ArrayRef",
    is  => "ro",
    required => 1,
);

has _processed => (
    is => "ro",
    lazy_build => 1,
);

sub _build__processed {
    my $self = shift;
    return [ map { { $_->extract_values, () } }
             @{$self->subqueries} ];
}

sub extract_values {
    my $self  = shift;

    return (
        subqueries => $self->_processed,
        operation  => $self->operation,
        method     => 'set'
    );
}

sub consistent {
    return 1;
}

__PACKAGE__->meta->make_immutable;

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Search::GIN::Query::Set - Create queries with set operations

=head1 VERSION

version 0.11

=head1 SYNOPSIS

    # build a query like:
    # (type:pdf OR type:png) AND (name:Homer OR name:Bart)

    use Search::GIN::Query::Set;
    use Search::GIN::Query::Manual;

    my $query = Search::GIN::Query::Set->new(
        operation => 'INTERSECT',
        subqueries => [
            Search::GIN::Query::Manual->new(
                values => {
                   type => [qw(pdf png)]
                }
            ),
            Search::GIN::Query::Manual->new(
                values => {
                   name => [qw(Homer Bart)]
                }
            ),
        ]
    );

=head1 DESCRIPTION

Creates a manual GIN query that can be used to search using basic set
theory, in order to build more complex queries.

This query doesn't provide any specific search, it's just a set
operator for subqueries. You can build complex queries by using other
set queries as subqueries for a set query.

=head1 METHODS/SUBROUTINES

=head2 new

Creates a new query.

=head1 ATTRIBUTES

=head2 subqueries

The subqueries to process

=head2 operation

One of the basic set operators: "UNION", "INTERSECT" and "EXCEPT". The
default is "UNION"

=head1 AUTHOR

יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2008 by יובל קוג'מן (Yuval Kogman), Infinity Interactive.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut