perldoc > Plucene::Document

🏷️ NAME

Plucene::Document - The unit of indexing and searching

🚀 Quick Reference

Use CaseCommandDescription
Create a new Documentmy $doc = Plucene::Document->new;Initialize a searchable document
Add a field$doc->add(Plucene::Document::Field $field);Attach a field to the document
Retrieve a field by namemy $field = $doc->get($name);Get the field object
List all fieldsmy @fields = $doc->fields;Get all fields in the document

📖 SYNOPSIS

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

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

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

📝 DESCRIPTION

📄 Documents are the unit of indexing and search, and each document is a set of 🏷️ fields. Each field has a name and a textual value.

🔍 A field may be stored with the document, in which case it is returned with search hits on the document. Thus each document should typically contain stored fields which uniquely identify it.

🔧 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.

➕ add

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

➕ This will add a field to the document.

📋 fields

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

📋 This returns an list of all the fields in a document.

Plucene::Document
🏷️ NAME 🚀 Quick Reference 📖 SYNOPSIS 📝 DESCRIPTION 🔧 METHODS
🔍 get ➕ add 📋 fields

Generated by phpman v4.9.29 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-20 18:36 @2600:1f28:365:80b0:8802:8bb4:3873:328e
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format