Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Plucene::Index::FieldsReader

Name Plucene::Index::FieldsReader
Version
Located at /usr/share/perl5
File /usr/share/perl5/Plucene/Index/FieldsReader.pm
Is Core No
Search CPAN for this module Plucene::Index::FieldsReader
Documentation Plucene::Index::FieldsReader
Module Details Plucene::Index::FieldsReader

NAME

Plucene::Index::FieldsReader - read Fields in a Document


SYNOPSIS

        my $reader = Plucene::Index::FieldsReader->new(
                $dir_name, $segment, $field_infos);
        my Plucene::Document $doc = $reader->doc($offset);
        my $size = $reader->size;


DESCRIPTION

This class gives access to documents within the index.


METHODS

new

        my $reader = Plucene::Index::FieldsReader->new(
                $dir_name, $segment, $field_infos);

This will create a new Plucene::Index::FieldsReader with the passed in directory name, segment and field infos.


=cut

sub new { my ($class, $dir, $seg, $fn) = @_; bless { field_infos => $fn, fields => Plucene::Store::InputStream->new(``$dir/$seg.fdt''), index => Plucene::Store::InputStream->new(``$dir/$seg.fdx''), size => ((-s ``$dir/$seg.fdx'') / 8) }, $class; }

size

        my $size = $reader->size;

This returns the size.

doc

        my Plucene::Document $doc = $reader->doc($offset);

This will return the Plucene::Document object found at the passed in position.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026