File Coverage

blib/lib/Plucene/Index/SegmentInfo.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
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     18   99 use strict;
  18         34  
  18         653  
34 18     18   97 use warnings;
  18         44  
  18         570  
35              
36 18     18   91 use base qw(Class::Accessor::Fast);
  18         34  
  18         1770  
37              
38             =head2 name / doc_count / dir
39              
40             Get / set these attributes.
41              
42             =cut
43              
44             __PACKAGE__->mk_accessors(qw/name doc_count dir/);
45              
46             1;