DBIx-Class-Indexer-WebService-Dezi

 view release on metacpan or  search on metacpan

lib/DBIx/Class/Indexer/WebService/Dezi.pm  view on Meta::CPAN

    return $self;
}


=head2 update_or_create_document( $object )

Handles the insert operation.

=cut

sub update_or_create_document {
    my $self   = shift;
    my $object = shift;

    $self->setup_fields( ref $object );
    $self->_dezi->index( $self->as_document( $object ), $object->id, $self->content_type );

}


=head2 value_for_field( $object, $key )

lib/DBIx/Class/Indexer/WebService/Dezi.pm  view on Meta::CPAN

    return if $self->disabled;
    $self->update_or_create_document( $object );
}

=head2 update( $object )

Handles the update operation.

=cut

sub update {
    my $self   = shift;
    my $object = shift;
    return if $self->disabled;
    
    $self->update_or_create_document( $object );
}

sub _determine_content_type {
    my ( $self, $file_path ) = @_;
    my ($ext)   = $file_path =~ /\.([^\.]+)$/g;



( run in 0.510 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )