Plucene/Search/TopDocs.pm

filter: Statementstmt 93.7% 15 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 91.3% 21 / 23 CC 2 SCAR 3.6
CC
2
Cov
89%
score_docs
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Plucene/Search/Scorer.pm ↑ Summary Plucene/Analysis/Token.pm »
1 package Plucene::Search::TopDocs;
2  
3 =head1 NAME
4  
5 Plucene::Search::TopDocs - The top hits for a query
6  
7 =head1 SYNOPSIS
8  
9 my $total_hits = $top_docs->total_hits;
10 my @score_docs = $top_docs->score_docs(@other);
11  
12 =head1 DESCRIPTION
13  
14 =head1 METHODS
15  
16 =head2 total_hits
17  
18 my $total_hits = $top_docs->total_hits;
19  
20 The total number of hits for the query.
21  
22 =cut
23  
24 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 16 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 16 ▶use base 'Class::Accessor::Fast';
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 16 __PACKAGE__->mk_accessors(qw/ total_hits score_docs /);
30  
31 =head2 score_docs
32  
33 my @score_docs = $top_docs->score_docs(@other);
34  
35 The top hits for the query.
36  
37 =cut
38  
39 189 ▶sub score_docs {
Subroutine score_docs: called CC=2 SCAR=7.4
Pod documented
40 189 my ($self, @other) = @_;
41 0 ▶ if (@other) { $self->{score_docs} = [@other] }
Branch: 1 branch
BranchTrueFalseTotal
if (@other) 0 189 189
42 189 @{ $self->{score_docs} };
43 }
44  
45 16 1;
« Plucene/Search/Scorer.pm ↑ Summary Plucene/Analysis/Token.pm »