Plucene::Document::Field - A field in a Plucene::Document
| Use Case | Command | Description |
|---|---|---|
| Create a keyword field (stored, indexed, not tokenized) | Plucene::Document::Field->Keyword($name, $string) | 🔑 Stored + indexed, no tokenization |
| Create a text field (stored, indexed, tokenized) | Plucene::Document::Field->Text($name, $string) | 📄 Full-text searchable |
| Create an unindexed field (stored only) | Plucene::Document::Field->UnIndexed($name, $string) | 💾 Stored but not searchable |
| Create an unstored field (indexed, tokenized, not stored) | Plucene::Document::Field->UnStored($name, $string) | 🔍 Indexed but not retrievable |
my $field = Plucene::Document::Field->Keyword($name, $string);
my $field = Plucene::Document::Field->Text($name, $string);
my $field = Plucene::Document::Field->UnIndexed($name, $string);
my $field = Plucene::Document::Field->UnStored($name, $string);
Each Plucene::Document is made up of Plucene::Document::Field objects. Each of these fields can be stored, indexed or tokenised.
name — Returns the name of the field.string — Returns the value of the field.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".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.
my $field = Plucene::Document::Field->UnIndexed($name, $string);
This will make a new Plucene::Document::Field object that is stored, but not indexed or tokenised.
my $field = Plucene::Document::Field->Text($name, $string);
This will make a new Plucene::Document::Field object that is stored, indexed and tokenised.
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.
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-17 05:03 @216.73.216.72
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)