Which Perl wrapper should I use?
If you want to access Xapian from Perl, there are several wrappers available. Some of these are designed for specialist use, some are more general.
Search::Xapian XS bindings
http://search.cpan.org/dist/Search-Xapian/
These are a set of hand-coded XS bindings, originally written by Alex Bowley, and now maintained by the Xapian project. These wrap a lot of the C++ API, but wrapping new classes and methods requires XS code to be written for them, so they tend to lag a bit.
Aside from the SWIG-generated Perl bindings, all the modules use Search::Xapian under the covers.
SWIG-generated Perl bindings in xapian-bindings
These were originally developed by Kosei Moriyama during Google Summer of Code 2009, and made their debut in the 1.2.4 release. They are close to being a drop-in replacement for the XS bindings, and the intention is that these will replace the XS bindings in the 1.4.0 release series. We encourage people to try them and let us know how they get on.
Catalyst::Model::Xapian
http://search.cpan.org/dist/Catalyst-Model-Xapian/
This is helper module to allow Xapian to be easily used in the Catalyst web application framework.
SWISH::Prog::Xapian
http://search.cpan.org/dist/SWISH-Prog-Xapian/
SWISH::Prog::Xapian is a Xapian-based implementation of Swish3, using the SWISH::3 bindings for libswish3. It is built on top of Search::Xapian.
The module's documentation suggests some reasons why you might want to use it:
Using Search::Xapian via SWISH::Prog::Xapian offers a few advantages:
- Aggregators and Filters
- 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.
- SWISH3
- SWISH::3 offers fast and robust XML and HTML parsers with an extensible configuration system, build on top of libxml2.
- Simple now, complex later
- You can index your content with SWISH::Prog::Xapian, then build a more complex searching application directly with Search::Xapian.
- Compatibility with swish_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.
Rose::DBx::Object::Indexed::Indexer::Xapian
http://search.cpan.org/dist/Rose-DBx-Object-Indexed/
This module allows Xapian to be used with the Rose web application construction kit.