Plucen...entInfo(3pm)

πŸ“¦
version 1.25 Β· 2 versions
  • 1.25 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.25 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Plucene::Index::SegmentInfo β€” it's giving "Information on a Segment" πŸ’–

okay bestie, welcome to the Plucene::Index::SegmentInfo page from the User Contributed Perl Documentation (3pm section, obviously). it's a lil Perl module, it's lowkey iconic, and it holds info about a Segment. that's the whole vibe. let's go πŸ¦‹


✨ SYNOPSIS ✨

no cap, this is literally the whole thing:

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);

see how she makes one, reads three things off her, then sets those same three things? that's the whole flow. get it, set it, slay. πŸ’…


🌸 DESCRIPTION 🌸

so this class holds information on a segment. simple. elegant. main character energy.

now here's the lore, bestie: the index database is composed of 'segments', and each one is stored in its own separate file. when you add documents to the index, new segments may be created. yes, they just spawn like that. and if you want fewer of them hanging around? you can compact the database and reduce the number of segments by optimizing it. spring cleaning for your index. iconic behavior fr fr ✨


πŸŽ€ METHODS πŸŽ€

name / doc_count / dir

get / set these attributes. that's it, that's the section. three lil attributes, three lil getters-and-setters, no drama, no notes. 🫢


real talk though: name, doc_count and dir are the entire API here. if you're looking for more methods, there are no more methods. she's compact and she knows it. πŸ’€

and that's the page!! πŸŽ‰

cute lil sign-off time: this gem comes from perl v5.36.0, dated 2022-12-04, and the page is Plucen...entInfo(3pm) β€” yes the title is truncated with dots, that's just how it renders, we don't make the rules. 🌈⭐ bye bestie, go optimize something πŸ’–

πŸ“¦ where this page comes from