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 > Rose::DBx::Object::Indexed::Indexer



Annotate this POD

View/Report Bugs
Module Version: 0.009   Source  


Rose::DBx::Object::Indexed::Indexer - Indexer base class


 # 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) {


Rose::DBx::Object::Indexed::Indexer uses SWISH::Prog to create and maintain full-text indexes of Rose::DB::Object instances.

This class is typically accessed via Rose::DBx::Object::Indexed instances.


Only new or overridden method are documented here.


Should return either a path to the index directory or a SWISH::Prog::InvIndex object. The default is a no-op, which will tell the indexer to generate a default SWISH::Prog::InvIndex object.


Should return a SWISH::Prog::Config instance. The default is a new Config instance.


The default is SWISH::Prog::Native::Indexer.


Just calls next::method().


Loads and returns an instance of indexer_class().


Should return a hash ref of relationship names to skip in serialize_object().

The default is an empty hash ref (skip nothing).


Should return array ref of key/value pairs to pass into the as_tree() method in Rose::DB::Object::Helpers. Default is an empty array.

get_primary_key( rdbo_obj )

Should return the primary key to be used as the "URL" of the indexed "document". The default return value is primary_key_uri_escaped() from the Rose::DBx::Object::MoreHelpers class.


Used by serialize_object(). The default value is 1.


Used by serialize_object(). The default value is 1 (which is not the default value in as_tree()).


Some messages on stderr if true. Default is false.

serialize_object( rdbo_object )

Returns rdbo_object as a hash ref, using the as_tree() Helper method.

xml_root_element( [tagname] )

Get/set the root tag name to use when serializing to XML. Default is to use the return value of get_xml_root_element().

get_xml_root_element( rdbo_obj )

Returns the name of the element to use as the top-level XML tag, by default the RDBO class name, XML-escaped.

to_xml( hash, rdbo_obj [, strip_plurals] )

Returns hash as XML, using xml_root_element() as the top-level tag.

make_doc( rdbo_obj )

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

run( rdbo_obj [, action] )

The main method. Serializes rdbo_obj and hands it to the swish_indexer() process() method.

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.


The Minnesota Supercomputing Institute sponsored the development of this software.


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.

syntax highlighting: