File: SegmentInfo.pm

package info (click to toggle)
libplucene-perl 1.25-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,320 kB
  • sloc: perl: 4,169; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 909 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package Plucene::Index::SegmentInfo;

=head1 NAME 

Plucene::Index::SegmentInfo - Information on a Segment

=head1 SYNOPSIS

	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);
	
=head1 DESCRIPTION

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.

=head1 METHODS

=cut

use strict;
use warnings;

use base qw(Class::Accessor::Fast);

=head2 name / doc_count / dir

Get / set these attributes.

=cut

__PACKAGE__->mk_accessors(qw/name doc_count dir/);

1;