NAME
Rose::DBx::Object::Indexed - full-text search for RDBO classes
SYNOPSIS
package MyRDBO;
use strict;
use base qw( Rose::DBx::Object::Indexed );
sub index_eligible { 1 }
1;
DESCRIPTION
Rose::DBx::Object::Indexed is a base class like Rose::DB::Object, with the added feature that your objects are added to a full-text index every time they are saved.
The idea is that you can provide full-text search for your database simply by subclassing Rose::DBx::Object::Indexed instead of Rose::DB::Object directly.
METHODS
Only new or overridden method are documented here.
init_index_eligible
Boolean indicating whether this class should be indexed on insert, update and delete.
The default is false (off), which means that even though you may subclass Rose::DBx::Object::Indexed, you must still turn the flag on by setting index_eligible() to true in the specific subclasses you want included in the index. This allows you to have a common base class that inherits from Rose::DBx::Object::Indexed and then selectively index various subclasses of your common base class.
init_indexer_class
Returns the name of the indexer class. The default is 'Rose::DBx::Object::Indexed::Indexer'.
init_indexer( args )
Returns a new instance of indexer_class(). args are passed through to the indexer_class new() method.
insert
Calls through to next::method and then indexes the object if index_eligible() is true.
update
Calls through to next::method and then indexes the object if index_eligible() is true.
delete
Calls through to next::method and then indexes the object if index_eligible() is true.
write_index( mode )
Passes the object ($self) on to the indexer method mode. This method is called internally by insert(), update() and delete().
AUTHOR
Peter Karman, <karman@cpan.org>
BUGS
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.
ACKNOWLEDGEMENTS
The Minnesota Supercomputing Institute http://www.msi.umn.edu/
sponsored the development of this software.
COPYRIGHT & LICENSE
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.