line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package KinoSearch1::Search::HitCollector; |
2
|
19
|
|
|
19
|
|
82043
|
use strict; |
|
19
|
|
|
|
|
41
|
|
|
19
|
|
|
|
|
761
|
|
3
|
19
|
|
|
19
|
|
116
|
use warnings; |
|
19
|
|
|
|
|
37
|
|
|
19
|
|
|
|
|
753
|
|
4
|
19
|
|
|
19
|
|
1167
|
use KinoSearch1::Util::ToolSet; |
|
19
|
|
|
|
|
44
|
|
|
19
|
|
|
|
|
6435
|
|
5
|
19
|
|
|
19
|
|
121
|
use base qw( KinoSearch1::Util::CClass ); |
|
19
|
|
|
|
|
38
|
|
|
19
|
|
|
|
|
3460
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# all xs, other than the pragmas/includes |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package KinoSearch1::Search::HitQueueCollector; |
10
|
19
|
|
|
19
|
|
105
|
use strict; |
|
19
|
|
|
|
|
43
|
|
|
19
|
|
|
|
|
680
|
|
11
|
19
|
|
|
19
|
|
101
|
use warnings; |
|
19
|
|
|
|
|
42
|
|
|
19
|
|
|
|
|
565
|
|
12
|
19
|
|
|
19
|
|
119
|
use KinoSearch1::Util::ToolSet; |
|
19
|
|
|
|
|
49
|
|
|
19
|
|
|
|
|
2564
|
|
13
|
19
|
|
|
19
|
|
102
|
use base qw( KinoSearch1::Search::HitCollector ); |
|
19
|
|
|
|
|
45
|
|
|
19
|
|
|
|
|
1627
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
BEGIN { |
16
|
19
|
|
|
19
|
|
225
|
__PACKAGE__->init_instance_vars( |
17
|
|
|
|
|
|
|
# constructor args |
18
|
|
|
|
|
|
|
size => undef, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
our %instance_vars; |
22
|
|
|
|
|
|
|
|
23
|
19
|
|
|
19
|
|
11660
|
use KinoSearch1::Search::HitQueue; |
|
19
|
|
|
|
|
53
|
|
|
19
|
|
|
|
|
4137
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new { |
26
|
284
|
|
|
284
|
|
2259
|
my $self = shift->SUPER::new; |
27
|
284
|
50
|
|
|
|
1338
|
confess kerror() unless verify_args( \%instance_vars, @_ ); |
28
|
284
|
|
|
|
|
987
|
my %args = @_; |
29
|
284
|
50
|
|
|
|
1307
|
croak("Required parameter: 'size'") unless defined $args{size}; |
30
|
|
|
|
|
|
|
|
31
|
284
|
|
|
|
|
2651
|
my $hit_queue |
32
|
|
|
|
|
|
|
= KinoSearch1::Search::HitQueue->new( max_size => $args{size} ); |
33
|
284
|
|
|
|
|
1714
|
$self->_set_storage($hit_queue); |
34
|
284
|
|
|
|
|
1420
|
$self->_define_collect; |
35
|
|
|
|
|
|
|
|
36
|
284
|
|
|
|
|
1066
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
*get_total_hits = *KinoSearch1::Search::HitCollector::get_i; |
40
|
|
|
|
|
|
|
*get_hit_queue = *KinoSearch1::Search::HitCollector::get_storage; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub get_max_size { |
43
|
3
|
|
|
3
|
|
50
|
shift->get_hit_queue->get_max_size; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
package KinoSearch1::Search::BitCollector; |
47
|
19
|
|
|
19
|
|
132
|
use strict; |
|
19
|
|
|
|
|
40
|
|
|
19
|
|
|
|
|
865
|
|
48
|
19
|
|
|
19
|
|
108
|
use warnings; |
|
19
|
|
|
|
|
52
|
|
|
19
|
|
|
|
|
760
|
|
49
|
19
|
|
|
19
|
|
112
|
use KinoSearch1::Util::ToolSet; |
|
19
|
|
|
|
|
41
|
|
|
19
|
|
|
|
|
2774
|
|
50
|
19
|
|
|
19
|
|
726
|
use base qw( KinoSearch1::Search::HitCollector ); |
|
19
|
|
|
|
|
42
|
|
|
19
|
|
|
|
|
1650
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
BEGIN { |
53
|
19
|
|
|
19
|
|
229
|
__PACKAGE__->init_instance_vars( |
54
|
|
|
|
|
|
|
# constructor params |
55
|
|
|
|
|
|
|
capacity => 0, |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
our %instance_vars; |
59
|
|
|
|
|
|
|
|
60
|
19
|
|
|
19
|
|
2283
|
use KinoSearch1::Util::BitVector; |
|
19
|
|
|
|
|
42
|
|
|
19
|
|
|
|
|
3243
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub new { |
63
|
2
|
|
|
2
|
|
1927
|
my $self = shift->SUPER::new; |
64
|
2
|
50
|
|
|
|
13
|
confess kerror() unless verify_args( \%instance_vars, @_ ); |
65
|
2
|
|
|
|
|
15
|
my %args = ( %instance_vars, @_ ); |
66
|
|
|
|
|
|
|
|
67
|
2
|
|
|
|
|
53
|
my $bit_vec |
68
|
|
|
|
|
|
|
= KinoSearch1::Util::BitVector->new( capacity => $args{capacity} ); |
69
|
2
|
|
|
|
|
80
|
$self->_set_storage($bit_vec); |
70
|
2
|
|
|
|
|
12
|
$self->_define_collect; |
71
|
|
|
|
|
|
|
|
72
|
2
|
|
|
|
|
9
|
return $self; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
*get_bit_vector = *KinoSearch1::Search::HitCollector::get_storage; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
package KinoSearch1::Search::FilteredCollector; |
78
|
19
|
|
|
19
|
|
105
|
use strict; |
|
19
|
|
|
|
|
35
|
|
|
19
|
|
|
|
|
556
|
|
79
|
19
|
|
|
19
|
|
146
|
use warnings; |
|
19
|
|
|
|
|
38
|
|
|
19
|
|
|
|
|
551
|
|
80
|
19
|
|
|
19
|
|
111
|
use KinoSearch1::Util::ToolSet; |
|
19
|
|
|
|
|
33
|
|
|
19
|
|
|
|
|
2592
|
|
81
|
19
|
|
|
19
|
|
105
|
use base qw( KinoSearch1::Search::HitCollector ); |
|
19
|
|
|
|
|
44
|
|
|
19
|
|
|
|
|
1605
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
BEGIN { |
84
|
19
|
|
|
19
|
|
243
|
__PACKAGE__->init_instance_vars( |
85
|
|
|
|
|
|
|
hit_collector => undef, |
86
|
|
|
|
|
|
|
filter_bits => undef, |
87
|
|
|
|
|
|
|
); |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
our %instance_vars; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub new { |
92
|
1
|
|
|
1
|
|
12
|
my $self = shift->SUPER::new; |
93
|
1
|
50
|
|
|
|
6
|
confess kerror() unless verify_args( \%instance_vars, @_ ); |
94
|
1
|
|
|
|
|
4
|
my %args = @_; |
95
|
1
|
50
|
|
|
|
43
|
croak("Required parameter: 'hit_collector'") |
96
|
|
|
|
|
|
|
unless a_isa_b( $args{hit_collector}, |
97
|
|
|
|
|
|
|
"KinoSearch1::Search::HitCollector" ); |
98
|
|
|
|
|
|
|
|
99
|
1
|
|
|
|
|
12
|
$self->_set_filter_bits( $args{filter_bits} ); |
100
|
1
|
|
|
|
|
9
|
$self->_set_storage( $args{hit_collector} ); |
101
|
1
|
|
|
|
|
4
|
$self->_define_collect; |
102
|
|
|
|
|
|
|
|
103
|
1
|
|
|
|
|
4
|
return $self; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
package KinoSearch1::Search::OffsetCollector; |
107
|
19
|
|
|
19
|
|
109
|
use strict; |
|
19
|
|
|
|
|
46
|
|
|
19
|
|
|
|
|
545
|
|
108
|
19
|
|
|
19
|
|
91
|
use warnings; |
|
19
|
|
|
|
|
57
|
|
|
19
|
|
|
|
|
1977
|
|
109
|
19
|
|
|
19
|
|
128
|
use KinoSearch1::Util::ToolSet; |
|
19
|
|
|
|
|
49
|
|
|
19
|
|
|
|
|
2598
|
|
110
|
19
|
|
|
19
|
|
103
|
use base qw( KinoSearch1::Search::HitCollector ); |
|
19
|
|
|
|
|
1412
|
|
|
19
|
|
|
|
|
1779
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
BEGIN { |
113
|
19
|
|
|
19
|
|
289
|
__PACKAGE__->init_instance_vars( |
114
|
|
|
|
|
|
|
hit_collector => undef, |
115
|
|
|
|
|
|
|
offset => undef, |
116
|
|
|
|
|
|
|
); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
our %instance_vars; |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub new { |
121
|
8
|
|
|
8
|
|
54
|
my $self = shift->SUPER::new; |
122
|
8
|
50
|
|
|
|
39
|
confess kerror() unless verify_args( \%instance_vars, @_ ); |
123
|
8
|
|
|
|
|
28
|
my %args = @_; |
124
|
8
|
50
|
|
|
|
30
|
croak("Required parameter: 'hit_collector'") |
125
|
|
|
|
|
|
|
unless a_isa_b( $args{hit_collector}, |
126
|
|
|
|
|
|
|
"KinoSearch1::Search::HitCollector" ); |
127
|
|
|
|
|
|
|
|
128
|
8
|
|
|
|
|
64
|
$self->_set_f( $args{offset} ); |
129
|
8
|
|
|
|
|
37
|
$self->_set_storage( $args{hit_collector} ); |
130
|
8
|
|
|
|
|
25
|
$self->_define_collect; |
131
|
|
|
|
|
|
|
|
132
|
8
|
|
|
|
|
34
|
return $self; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
1; |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
__END__ |