NAME
Search::Xapian - Perl XS frontend to the Xapian C++ search library.
SYNOPSIS
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();
}
DESCRIPTION
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/
EXPORT
None by default.
TODO
- Error Handling
-
Error handling for all method liable to generate them.
- Documentation
-
Brief descriptions of classes, possibly just adapted for xapian docs.
- Search::Xapian::Simple
-
To provide a simplified, more 'Perlish' interface.
AUTHOR
Alex Bowley <kilinrax@cpan.org>
SEE ALSO
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 122:
You forgot a '=back' before '=head1'