SWISH::Prog - information retrieval application framework
use SWISH::Prog; my $program = SWISH::Prog->new( invindex => 'path/to/myindex', aggregator => 'fs', indexer => 'native', config => 'some/swish/config/file', filter => sub { print $_[0]->url . "\n" }, ); $program->run('some/dir'); print $program->count . " documents indexed\n";
NOTE: As of version 0.20 this API has been completely redesigned from previous versions.
SWISH::Prog is a full-text search framework based on Swish-e. SWISH::Prog handles document and data aggregation and indexing.
The name "SWISH::Prog" comes from the Swish-e -S prog feature. "prog" is short for "program". SWISH::Prog makes it easy to write indexing and search programs.
The API is a work in progress and subject to change.
All of the following methods may be overridden when subclassing this module.
Overrides base SWISH::Prog::Class init() method.
Get the SWISH::Prog::Aggregator object. You should set this in new().
Execute the program. This is an alias for index().
Add items in collection to the invindex().
Returns the aggregator's config() object.
Returns the indexer's invindex.
Returns the indexer.
Returns the indexer's count. NOTE This is the number of documents actually indexed, not counting the number of documents considered and discarded by the aggregator. If you want the number of documents the aggregator looked at, regardless of whether they were indexed, use the aggregator's count() method.
Dry run mode, just prints info on stderr but does not build index. This flag is set in new() and passed to the indexer and aggregator.
Peter Karman, <perl@peknet.com>
Please report any bugs or feature requests to bug-swish-prog at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SWISH-Prog. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-swish-prog at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc SWISH::Prog
You can also look for information at:
Mailing list
http://lists.swish-e.org/listinfo/users
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=SWISH-Prog
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/SWISH-Prog
CPAN Ratings
http://cpanratings.perl.org/d/SWISH-Prog
Search CPAN
http://search.cpan.org/dist/SWISH-Prog/
Copyright 2008-2009 by Peter Karman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://swish-e.org/
SWISH::Prog::Doc, SWISH::Prog::Headers, SWISH::Prog::Indexer, SWISH::Prog::InvIndex, SWISH::Prog::Utils, SWISH::Prog::Aggregator, SWISH::Prog::Config
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.