SWISH::Prog::Xapian - Swish3 Xapian backend
# create an indexing program use SWISH::Prog; my $indexer = SWISH::Prog->new( invindex => 'path/to/index.swish', aggregator => 'fs', indexer => 'xapian', config => 'path/to/swish.conf', ); $indexer->index('path/to/files'); # then search the index my $searcher = SWISH::Prog::Xapian::Searcher->new( invindex => 'path/to/index.swish', config => 'path/to/swish.conf', ); my $results = $searcher->search('my query') while ( my $result = $results->next ) { printf("%s : %s\n", $result->score, $result->uri); }
STOP: Read the SWISH::Prog documentation before you use this module.
SWISH::Prog::Xapian is a Xapian-based implementation of Swish3, using the SWISH::3 bindings for libswish3.
See the Swish3 development site at http://dev.swish-e.org/wiki/swish3
You can use Search::Xapian directly. Using Search::Xapian via SWISH::Prog::Xapian offers a few advantages:
You get to use all of SWISH::Prog's Aggregators and SWISH::Filter support. So you can easily index all kinds of file formats (email, .txt, .html, .xml, .pdf, .doc, .xls, etc) without writing your own parser.
SWISH::3 offers fast and robust XML and HTML parsers with an extensible configuration system, build on top of libxml2.
You can index your content with SWISH::Prog::Xapian, then build a more complex searching application directly with Search::Xapian.
The swish_xapian tool that comes as part of libswish3 should generate compatible indexes. So you can create indexes with SWISH::Prog::Xapian::Indexer and search them with swish_xapian and vice versa.
swish_xapian
Peter Karman, <karman at cpan dot org>
<karman at cpan dot org>
Please report any bugs or feature requests to bug-swish-prog-xapian at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SWISH-Prog-Xapian. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-swish-prog-xapian at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc SWISH::Prog::Xapian
You can also look for information at:
Mailing list
http://lists.swish-e.org/listinfo/users
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/SWISH-Prog-Xapian
CPAN Ratings
http://cpanratings.perl.org/d/SWISH-Prog-Xapian
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=SWISH-Prog-Xapian
Search CPAN
http://search.cpan.org/dist/SWISH-Prog-Xapian
Copyright 2009 Peter Karman, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SWISH::Prog, Search::Xapian
To install SWISH::Prog::Xapian, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SWISH::Prog::Xapian
CPAN shell
perl -MCPAN -e shell install SWISH::Prog::Xapian
For more information on module installation, please visit the detailed CPAN module installation guide.