Plucene::SearchEngine::Index::Base - The definitely indexer base class
This module is the base class from which both frontend and backend indiexing modules should inherit. It makes it easier for modules to create Plucene::Document objects through the intermediary of a nested hash.
Plucene::Document
__PACKAGE__->register_handler($ext, $mime_type, $ext2, ...);
This registers the module to handle each given extension or MIME type. Base works out whether a parameter is a file extension or a MIME type.
Base
$self->handler_for($filename, $mime_type)
This finds the relevant handler which has been registered for the givern mime type or file name extension.
This creates a new backend object, which knows about the handler, type and indexed date for the data.
handler
type
indexed
$self->add_data($field, $type, $data);
This adds data to a backend object. A backend object represents a Plucene::Document, a hash which will later be turned into a Plucene::Document object.
The $field element should be the field name that's stored in Plucene. The $type should be one of the methods that Plucene::Document::Field can cope with - Keyword, Text, UnIndexed, UnStored - or Date, which takes a Time::Piece object as its $data.
$field
$type
Plucene::Document::Field
Date
Time::Piece
$data
This turns the backend's hash into a Plucene::Document.
To install Plucene::SearchEngine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plucene::SearchEngine
CPAN shell
perl -MCPAN -e shell install Plucene::SearchEngine
For more information on module installation, please visit the detailed CPAN module installation guide.