Plucen...:Field(3pm)
π Plucene::Document::Field β a field in a Plucene::Document π
okay so bestie, listen. this is Plucene::Document::Field, from the User Contributed Perl Documentation corner of the perl universe. it's giving tiny-but-mighty. it's giving building block. let's get into it π«Ά
β¨ SYNOPSIS β¨
my $field = Plucene::Document::Field->Keyword($name, $string);
my $field = Plucene::Document::Field->Text($name, $string);
my $field = Plucene::Document::Field->UnIndexded($name, $string);
my $field = Plucene::Document::Field->UnStored($name, $string);
(yes, UnIndexded β that's literally how it's spelled up there, we don't fix, we report π
)
πΈ DESCRIPTION πΈ
So. Every single Plucene::Document is made up of Plucene::Document::Field objects. Like, the document is the outfit and the fields are the accessories, no cap. π
And each one of these fields can be:
- stored πΎ
- indexed π
- tokenised βοΈ
...or not! any combo. that's the whole vibe. the methods below decide which combo you get. main character energy fr fr.
π¦ FIELDS π¦
these are the lil accessors, the little peek-behind-the-curtain moments π
name
Returns the name of the field. literally just the name. iconic.
string
Returns the value of the field. the actual content, the substance, the ~lore~.
is_stored
Returns true if the field is or will be stored, or false if it was created with UnStored. π«Ά
is_indexed
Returns true if the field is or will be indexed, or false if it was created with UnIndexed.
is_tokenized
Returns true if the field is or will be tokenized, or false if it was created with UnIndexed or Keyword. βοΈ
π METHODS π
four ways to make a field. pick your fighter.
Keyword
my $field = Plucene::Document::Field->Keyword($name, $string);
This will make a new Plucene::Document::Field object that is stored and indexed, but not tokenised. it's the "take me as i am, whole, don't break me into pieces" field. π
UnIndexed
my $field = Plucene::Document::Field->UnIndexded($name, $string);
This will make a new Plucene::Document::Field object that is stored, but not indexed and not tokenised. it's just... sitting there. being pretty. keeping your data safe. πΈ
β οΈ heads up: the method is namedUnIndexedbut the synopsis line literally writesUnIndexded. that's a typo in the docs themselves, and we are faithfully preserving it because facts are facts. iykyk.
Text
my $field = Plucene::Document::Field->Text($name, $string);
This will make a new Plucene::Document::Field object that is stored, indexed and tokenised. the full package. ate and left no crumbs. π₯
UnStored
my $field = Plucene::Document::Field->UnStored($name, $string);
This will make a new Plucene::Document::Field object that isn't stored, but is indexed and tokenised. it's there for the search, not for the archive. mysterious. elusive. π¦
π quick vibe recap
Keywordβ stored β indexed β tokenised βUnIndexedβ stored β indexed β tokenised βTextβ stored β indexed β tokenised βUnStoredβ stored β indexed β tokenised β
no cap, that's the whole entire thing. π
π that's a wrap on Plucene::Document::Field(3pm), bestie! this page ships as part of perl v5.36.0, dated 2022-12-04, in the User Contributed Perl Documentation collection. go forth and index responsibly. mwah πβ¨
π¦ where this page comes from
- debian bookworm: libplucene-perl 1.25-5
- debian trixie: libplucene-perl 1.25-5
- ubuntu noble: libplucene-perl 1.25-5
- ubuntu resolute: libplucene-perl 1.25-5
- ubuntu stonking: libplucene-perl 1.25-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms