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

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

Indexing

Bindings for OmWriteableDatabase, OmStem, and other classes needed for indexing and database creation.

Tests

Separate out test scripts and examples.

Error Handling

Returning OmErrors to Perl in a sane manner.

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

perl. xapian.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 126:

You forgot a '=back' before '=head1'