line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package KinoSearch1::Search::TermScorer; |
2
|
18
|
|
|
18
|
|
108
|
use strict; |
|
18
|
|
|
|
|
38
|
|
|
18
|
|
|
|
|
678
|
|
3
|
18
|
|
|
18
|
|
97
|
use warnings; |
|
18
|
|
|
|
|
45
|
|
|
18
|
|
|
|
|
519
|
|
4
|
18
|
|
|
18
|
|
101
|
use KinoSearch1::Util::ToolSet; |
|
18
|
|
|
|
|
38
|
|
|
18
|
|
|
|
|
2676
|
|
5
|
18
|
|
|
18
|
|
103
|
use base qw( KinoSearch1::Search::Scorer ); |
|
18
|
|
|
|
|
38
|
|
|
18
|
|
|
|
|
2918
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
18
|
|
|
18
|
|
231
|
__PACKAGE__->init_instance_vars( |
9
|
|
|
|
|
|
|
# constructor params |
10
|
|
|
|
|
|
|
weight => undef, |
11
|
|
|
|
|
|
|
term_docs => undef, |
12
|
|
|
|
|
|
|
norms_reader => undef, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
our %instance_vars; |
16
|
|
|
|
|
|
|
|
17
|
18
|
|
|
18
|
|
210
|
use KinoSearch1::Search::Scorer qw( %score_batch_args ); |
|
18
|
|
|
|
|
45
|
|
|
18
|
|
|
|
|
6575
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
421
|
|
|
421
|
1
|
2073
|
my $self = shift->SUPER::new; |
21
|
421
|
50
|
|
|
|
1506
|
confess kerror() unless verify_args( \%instance_vars, @_ ); |
22
|
421
|
|
|
|
|
2383
|
my %args = ( %instance_vars, @_ ); |
23
|
|
|
|
|
|
|
|
24
|
421
|
|
|
|
|
1978
|
$self->_init_child; |
25
|
|
|
|
|
|
|
|
26
|
421
|
|
|
|
|
2072
|
$self->_set_term_docs( $args{term_docs} ); |
27
|
421
|
|
|
|
|
2251
|
$self->_set_norms( $args{norms_reader}->get_bytes ); |
28
|
421
|
|
|
|
|
2059
|
$self->set_similarity( $args{similarity} ); |
29
|
421
|
|
|
|
|
1943
|
$self->_set_weight( $args{weight} ); |
30
|
421
|
|
|
|
|
1633
|
$self->_set_weight_value( $args{weight}->get_value ); |
31
|
|
|
|
|
|
|
|
32
|
421
|
|
|
|
|
1956
|
$self->_fill_score_cache; |
33
|
|
|
|
|
|
|
|
34
|
421
|
|
|
|
|
1758
|
return $self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |