| Plucene documentation | Contained in the Plucene distribution. |
Plucene::Index::SegmentInfo - Information on a Segment
my $segment_info = Plucene::Index::SegmentInfo->new; # get my $name = $segment_info->name; my $doc_count = $segment_info->doc_count; my $dir = $segment_info->dir; # set $segment_info->name($new_name); $segment_info->doc_count($new_doc_count); $segment_info->dir($new_dir);
This class holds information on a segment.
The index database is composed of 'segments' each stored in a separate file. When you add documents to the index, new segments may be created. You can compact the database and reduce the number of segments by optimizing it.
Get / set these attributes.
| Plucene documentation | Contained in the Plucene distribution. |
package Plucene::Index::SegmentInfo;
use strict; use warnings; use base qw(Class::Accessor::Fast);
__PACKAGE__->mk_accessors(qw/name doc_count dir/); 1;