Plucen...ocument(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

πŸ’– NAME πŸ’–

Plucene::Document β€” literally the unit of indexing and searching ✨ that's the whole vibe, bestie, no cap.

(also, hi, this is the page for Plucen...ocument(3pm) β€” yes the name is cursed, we don't talk about it 🫢)


πŸŽ€ SYNOPSIS πŸŽ€

okay so here's the tea, copy-paste it exactly:

my $document = Plucene::Document->new;

$document->add( Plucene::Document::Field $field);
my Plucene::Document::Field $field = $document->get($field_name);

my Plucene::Document::Fields @fields = $document->fields;

πŸ¦‹ DESCRIPTION πŸ¦‹

Documents are the unit of indexing and search, periodt. And every single document is a set of fields. Each field has a name and a textual value β€” that's it, that's the whole anatomy πŸ’…

A field may be stored with the document, in which case it is returned with search hits on the document. So like… each document should typically contain stored fields which uniquely identify it. πŸ‘‘

ngl bestie, if you skip the stored-unique-identifier thing, your search hits are gonna be giving absolutely nothing. do not do that to yourself 😭

✨ METHODS ✨

🌸 get

my Plucene::Document::Field $field = $document->get($field_name);

This returns the Plucene::Document::Field object of the field with the given name if any exist in this document, or null. so like, if she's there, you get her; if she's not, you get null and you simply move on 🧚

πŸ’œ add

$document->add( Plucene::Document::Field $field);

This will add a field to the document. iconic behavior honestly, adding is her whole thing 🌈

πŸ“ fields

my Plucene::Document::Field @fields = $document->fields;

This returns an list of all the fields in a document. every last one, no crumbs left behind, we love a complete inventory πŸ’–


that's the whole page bestie!! go forth and index slayfully βœ¨πŸ¦‹πŸŒΈ

sign-off, written down here instead of a boring footer line: this was Plucen...ocument(3pm), and the docs were made by the perl v5.36.0 girlies, dated 2022-12-04. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from