DOKK / manpages / debian 10 / libplucene-perl / Plucene::Index::SegmentInfos.3pm.en
Plucene::Index::SegmentInfos(3pm) User Contributed Perl Documentation Plucene::Index::SegmentInfos(3pm)

Plucene::Index::SegmentInfos - A collection of SegmentInfo objects

        my $segmentinfos = Plucene::Index::SegmentInfos->new;
        $segmentinfos->read($dir);
        $segmentinfos->write($dir);
        $segmentinfos->add_element(Plucene::Index::SegmentInfo $segment_info);
        my Plucene::Index::SegmentInfo @segment_info 
                = $segmentinfos->segments;

This is a collection of Plucene::Index::SegmentInfo objects

        my $segmentinfos = Plucene::Index::SegmentInfos->new;

This will create a new (empty) Plucene::Index::SegmentInfos object.

        $segmentinfos->read($dir);

This will read the segments file from the passed directory.

        $segmentinfos->write($dir);

This will write the segments info file out.

        $segmentinfos->add_element(Plucene::Index::SegmentInfo $segment_info);

This will add the passed Plucene::Index::SegmentInfo object..

        my Plucene::Index::SegmentInfo $info 
                = $segmentinfos->info($segment_no);

This will return the Plucene::Index::SegmentInfo object at the passed segment number.

        my Plucene::Index::SegmentInfo @segment_info 
                = $segmentinfos->segments;

This returns all the Plucene::Index::SegmentInfo onjects in this segment.

2018-04-02 perl v5.26.1