et_indexer( 'WebService::Dezi', { server => 'http://localhost:5000', content_type => 'application/json' } );
__PACKAGE__->table('person');
__PACKAGE__->add_columns(
person_id
TTRIBUTES
=head2 as_document( $self, $object )
Handles the insert operation. Generates a XML or JSON document
that will be indexed by the dezi service.
=cut
sub as_document {
my ( $self, $obj
Name=>'doc',);
} elsif ( $self->content_type eq 'application/json' ) {
require JSON;
$output_str = JSON::encode_json({ doc => $fields });
}
return $output_str;
}
__PACKAG