Plucen...Writer(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::FieldsWriter β€” the manual page, but make it cute πŸ’–

okay bestie, so this is the docs for Plucene::Index::FieldsWriter β€” yes, it's one of those User Contributed Perl Documentation pages, and yes it's giving ✨niche Perl module✨ but honestly? kinda iconic. let's get into it 🫢


🌸 NAME 🌸

Plucene::Index::FieldsWriter β€” literally just here to write Fields to a Document. that's the whole job. no cap. πŸ’…


✨ SYNOPSIS ✨

here's the vibe, copy-paste ready:

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

$writer->add_document(Plucene::Document $doc);

like. look at her. so clean. so simple. the way she just does that πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

so this class adds documents to the appropriate files. that's it, that's the description. she's a writer, she writes, she puts your docs where they belong. main character energy fr fr πŸ‘‘


πŸ’… METHODS πŸ’…

🌈 new

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

this creates a brand new Plucene::Index::FieldsWriter object for you, using the directory name, segment and field infos you passed in. you hand her the $dir_name, the $segment, and the $field_infos, and boom β€” new writer, freshly glowed up ✨

🌸 close

$writer->close;

she closes. that's the method. that's all she does. close the writer, bestie. πŸŽ€

πŸ’– add_document

$writer->add_document(Plucene::Document $doc);

this one adds the passed Plucene::Document. give her a doc, she'll take care of it. periodt. πŸ’…


ngl the whole module is short and sweet β€” but every method still ate, no crumbs left behind πŸ“

and that's the page, babe!! this was Plucene::Index::FieldsWriter(3pm) from the User Contributed Perl Documentation, and the footer was giving perl v5.36.0, dated 2022-12-04 β€” so go forth, write those Fields to those Documents, and slay πŸ’œπŸ§š

πŸ“¦ where this page comes from