SWISH::Prog::Indexer - base indexer class
use SWISH::Prog::Indexer; my $indexer = SWISH::Prog::Indexer->new( invindex => SWISH::Prog::InvIndex->new, config => SWISH::Prog::Config->new, count => 0, clobber => 1, flush => 10000, started => time() ); $indexer->start; for my $doc (@list_of_docs) { $indexer->process($doc); } $indexer->finish;
SWISH::Prog::Indexer is a base class implementing the simplest of indexing APIs. It is intended to be subclassed, along with InvIndex, for each IR backend library.
Constructor. See the SYNOPSIS for default options.
Opens the invindex() objet and sets the started() time to time().
doc should be a SWISH::Prog::Doc-derived object.
process() should implement whatever the particular IR library API requires.
Closes the invindex().
Peter Karman, <perl@peknet.com>
Copyright 2008 by Peter Karman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SWISH::Prog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SWISH::Prog
CPAN shell
perl -MCPAN -e shell install SWISH::Prog
For more information on module installation, please visit the detailed CPAN module installation guide.