DBIx::Class::Indexer::WebService::Dezi - An indexer for Dezi/Lucy.
Version 0.08
This module was inspired (and borrowed some) by DBIx::Class::Indexer::WebService::Solr. In fact it uses DBIx::Class::Indexer as its abstract class. This indexer allows one to use a Dezi::Client to update the index on "insert", "update", or "delete".
package MyApp::Schema::Foo; use base 'DBIx::Class'; __PACKAGE__->load_components( qw[ Indexed ] ); __PACKAGE__->set_indexer( 'WebService::Dezi', { server => 'http://localhost:5000', content_type => 'application/json' } ); __PACKAGE__->table('person'); __PACKAGE__->add_columns( person_id => { data_type => 'varchar', size => '36', is_nullable => 0, }, name => { data_type => 'varchar', is_nullable => 0, indexed => 1 }, age => { data_type => 'integer', is_nullable => 0, }, image_path => { data_type => 'varchar', size => '128', indexed => { is_binary => 1, base64_encode => 1 }, }, email => { data_type => 'varchar', size => '128', }, created => { data_type => 'timestamp', set_on_create => 1, is_nullable => 0, }, );
Can be set to 1 or contain a hashref.
Flags an indexied field as a binary pointer. Will attempt to slurp the contents for indexing.
A flag that will make a is_binary indexed field converted to base64. It is worth noting that highlighting needs to be turned off in the dezi config for this to properly index.
Connect info parameters.
Will disable any calls to Dezi::Client and indexing. This is useful in preventing exceptions if the Dezi server is temporarily down.
Source object
Internal dezi object.
Used for noramalization of fields.
Handles the insert operation. Generates a XML or JSON document that will be indexed by the dezi service.
Creates a new Dezi::Client object and normalizes the fields to be indexed.
Handles the insert operation.
Uses the indexed fields information to determine how to get the values for $key out of $object.
$key
$object
The logic here was borrowed from DBIx::Class::Indexer::WebService::Solr
Normalizes the index fields so they all have hashref members with an optional boost key.
Handles the delete operation.
Handles the update operation.
Logan Bell, <loganbell at gmail.com>
<loganbell at gmail.com>
Please report any bugs or feature requests to bug-dbix-class-indexer-webservice-dezi at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBIx-Class-Indexer-WebService-Dezi. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-dbix-class-indexer-webservice-dezi at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc DBIx::Class::Indexer::WebService::Dezi
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class-Indexer-WebService-Dezi
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/DBIx-Class-Indexer-WebService-Dezi
CPAN Ratings
http://cpanratings.perl.org/d/DBIx-Class-Indexer-WebService-Dezi
Search CPAN
http://search.cpan.org/dist/DBIx-Class-Indexer-WebService-Dezi/
Copyright 2012 Logan Bell.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install DBIx::Class::Indexer::WebService::Dezi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::Indexer::WebService::Dezi
CPAN shell
perl -MCPAN -e shell install DBIx::Class::Indexer::WebService::Dezi
For more information on module installation, please visit the detailed CPAN module installation guide.