View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Peter Karman > Rose-DBx-Object-Indexed-0.009 > Rose::DBx::Object::Indexed::Indexer::Xapian



Annotate this POD

View/Report Bugs
Module Version: 0.009   Source  


Rose::DBx::Object::Indexed::Indexer::Xapian - Xapian indexer


 # from a Rose::DBx::Object::Indexed object
 my $thing = MyThing->new( id => 123 )->load;
 # standalone
 my $indexer = MyThing->init_indexer;
 while (my $thing = $thing_iterator->next) {


Returns 'SWISH::Prog::Xapian::Indexer'.

make_doc( rdbo_obj )

Returns a SWISH::Prog::Doc instance for rdbo_obj.

run( args )

Calls the superclass method and then finish() on the swish_indexer(). Note that the explicit call to finish() means that a new indexer is spawned for each insert(), update() or delete(). If you are trying to do bulk index updates, avoid this kind of overhead and do not call run(). Instead, do something like:

 my $swish_indexer = $object->swish_indexer;
 my $indexer       = $object->indexer;
 foreach my $obj (@list_of_objects) {
    my $doc = $indexer->make_doc($obj);
 $swish_indexer->finish(); # must do this to commit the index transaction.

insert( rdbo_obj )

Calls run() with the appropriate arguments.

update( rdbo_obj )

Calls run() with the appropriate arguments.

delete( rdbo_obj )

Calls run() with the appropriate arguments.


Peter Karman, <>


Please report any bugs or feature requests to, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


Copyright 2010 by Peter Karman.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: