Plucene/Index/SegmentInfo.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Plucene/Bitvector.pm ↑ Summary Plucene/Search/BooleanClause.pm »
1 package Plucene::Index::SegmentInfo;
2  
3 =head1 NAME
4  
5 Plucene::Index::SegmentInfo - Information on a Segment
6  
7 =head1 SYNOPSIS
8  
9 my $segment_info = Plucene::Index::SegmentInfo->new;
10  
11 # get
12 my $name = $segment_info->name;
13 my $doc_count = $segment_info->doc_count;
14 my $dir = $segment_info->dir;
15  
16 # set
17 $segment_info->name($new_name);
18 $segment_info->doc_count($new_doc_count);
19 $segment_info->dir($new_dir);
20
21 =head1 DESCRIPTION
22  
23 This class holds information on a segment.
24  
25 The index database is composed of 'segments' each stored in a separate file.
26 When you add documents to the index, new segments may be created. You can
27 compact the database and reduce the number of segments by optimizing it.
28  
29 =head1 METHODS
30  
31 =cut
32  
33 18 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 18 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 18 ▶use base qw(Class::Accessor::Fast);
Subroutine BEGIN: called CC=1 SCAR=0.0
37  
38 =head2 name / doc_count / dir
39  
40 Get / set these attributes.
41  
42 =cut
43  
44 18 __PACKAGE__->mk_accessors(qw/name doc_count dir/);
45  
46 18 1;
« Plucene/Bitvector.pm ↑ Summary Plucene/Search/BooleanClause.pm »