The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SWISH::Prog - information retrieval application framework

SYNOPSIS

  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";
          

DESCRIPTION

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.

METHODS

All of the following methods may be overridden when subclassing this module.

init

Overrides base SWISH::Prog::Class init() method.

run

Execute the program.

config

Returns the aggregator's config() object.

invindex

Returns the indexer's invindex.

indexer

Returns the indexer.

count

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.

SEE ALSO

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

AUTHOR

Peter Karman, <perl@peknet.com>

COPYRIGHT AND LICENSE

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.