Search::Xapian - Perl XS frontend to the Xapian C++ search library.
use Search::Xapian; my $settings = Search::Xapian::Settings->new(); $settings->set( 'backend', 'auto' ); $settings->set( 'auto_dir', '[DATABASE DIR]' ); my $db = Search::Xapian::Database->new( $settings ); my $enq = Search::Xapian::Enquire->new( $db ); my $query = Search::Xapian::Query->new( '[QUERY TERM]' ); printf "Parsing query '%s'\n", $query->get_description(); $enq->set_query( $query ); my $matches = $enq->get_mset( 0, 10 ); printf "%d results found\n", $matches->get_estimated(); my $match = $matches->begin(); my $size = $matches->size(); while( $size-- ){ printf "ID %d %d%% [ %s ]\n", $match->get_docid(), $match->get_percent(), $match->get_document()->get_data(); $match->inc(); }
Currently this module only provides objects required for searching, not indexing. Expect this to change in the near future.
More detailed documentation on xapian can be found at http://www.xapian.org/
None by default.
Bindings for OmWriteableDatabase, OmStem, and other classes needed for indexing and database creation.
Separate out test scripts and examples.
Returning OmErrors to Perl in a sane manner.
Brief descriptions of classes, possibly just adapted for xapian docs.
To provide a simplified, more 'Perlish' interface.
Alex Bowley <kilinrax@cpan.org>
perl. xapian.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Search::Xapian, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::Xapian
CPAN shell
perl -MCPAN -e shell install Search::Xapian
For more information on module installation, please visit the detailed CPAN module installation guide.