Rose::DBx::Object::Indexed::Indexer::Xapian - Xapian indexer
# from a Rose::DBx::Object::Indexed object my $thing = MyThing->new( id => 123 )->load; $thing->write_index('insert'); # standalone my $indexer = MyThing->init_indexer; while (my $thing = $thing_iterator->next) { $indexer->insert($thing); }
Returns 'SWISH::Prog::Xapian::Indexer'.
Returns a SWISH::Prog::Doc instance for rdbo_obj.
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->process($doc); } $swish_indexer->finish(); # must do this to commit the index transaction.
Calls run() with the appropriate arguments.
Peter Karman, <karman@cpan.org>
<karman@cpan.org>
Please report any bugs or feature requests to bug-rose-dbx-object-indexed@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-rose-dbx-object-indexed@rt.cpan.org
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.
To install Rose::DBx::Object::Indexed, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rose::DBx::Object::Indexed
CPAN shell
perl -MCPAN -e shell install Rose::DBx::Object::Indexed
For more information on module installation, please visit the detailed CPAN module installation guide.