line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package KinoSearch1::Index::SegTermDocs; |
2
|
34
|
|
|
34
|
|
65972
|
use strict; |
|
34
|
|
|
|
|
74
|
|
|
34
|
|
|
|
|
1144
|
|
3
|
34
|
|
|
34
|
|
172
|
use warnings; |
|
34
|
|
|
|
|
60
|
|
|
34
|
|
|
|
|
826
|
|
4
|
34
|
|
|
34
|
|
1288
|
use KinoSearch1::Util::ToolSet; |
|
34
|
|
|
|
|
67
|
|
|
34
|
|
|
|
|
4791
|
|
5
|
34
|
|
|
34
|
|
196
|
use base qw( KinoSearch1::Index::TermDocs ); |
|
34
|
|
|
|
|
70
|
|
|
34
|
|
|
|
|
20517
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
34
|
|
|
34
|
|
385
|
__PACKAGE__->init_instance_vars( |
9
|
|
|
|
|
|
|
# constructor params |
10
|
|
|
|
|
|
|
reader => undef, |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
our %instance_vars; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
654
|
|
|
654
|
1
|
3869
|
my $self = shift->SUPER::new; |
17
|
654
|
50
|
|
|
|
2416
|
confess kerror() unless verify_args( \%instance_vars, @_ ); |
18
|
654
|
|
|
|
|
2405
|
my %args = ( %instance_vars, @_ ); |
19
|
654
|
|
|
|
|
1261
|
my $reader = $args{reader}; |
20
|
|
|
|
|
|
|
|
21
|
654
|
|
|
|
|
2424
|
_init_child($self); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# dupe some stuff from the parent reader. |
24
|
654
|
|
|
|
|
3021
|
$self->_set_reader($reader); |
25
|
654
|
|
|
|
|
2329
|
$self->_set_skip_interval( $reader->get_skip_interval ); |
26
|
654
|
|
|
|
|
2451
|
$self->_set_freq_stream( $reader->get_freq_stream()->clone_stream ); |
27
|
654
|
|
|
|
|
2226
|
$self->_set_skip_stream( $reader->get_freq_stream()->clone_stream ); |
28
|
654
|
|
|
|
|
2289
|
$self->_set_prox_stream( $reader->get_prox_stream()->clone_stream ); |
29
|
654
|
|
|
|
|
2600
|
$self->_set_deldocs( $reader->get_deldocs ); |
30
|
|
|
|
|
|
|
|
31
|
654
|
|
|
|
|
1983
|
return $self; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub seek { |
35
|
672
|
|
|
672
|
0
|
2723
|
my ( $self, $term ) = @_; |
36
|
672
|
100
|
|
|
|
4044
|
my $tinfo |
37
|
|
|
|
|
|
|
= defined $term |
38
|
|
|
|
|
|
|
? $self->_get_reader()->fetch_term_info($term) |
39
|
|
|
|
|
|
|
: undef; |
40
|
672
|
|
|
|
|
4740
|
$self->seek_tinfo($tinfo); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub close { |
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
45
|
0
|
|
|
|
|
|
$self->_get_freq_stream()->close; |
46
|
0
|
|
|
|
|
|
$self->_get_prox_stream()->close; |
47
|
0
|
|
|
|
|
|
$self->_get_skip_stream()->close; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |