Dezi 0.1.8 released

Dezi 0.1.8 has been uploaded to CPAN.

New versions of the PHP, Perl and Python clients have also been released.

This new version of Dezi introduces a big performance optimization, in the form of transactions. Previous versions would open a new Indexer on every HTTP request, calling $indexer->finish() on every document addition. While that request represented a single transaction in itself, it also meant significant slowdowns when trying to push many consecutive documents to a Dezi server.

Now, if you pass the auto_commit => 0 flag in your Dezi engine_config, a new Indexer is spawned only on the first document, and is then cached and re-used until you POST a request to /commit. Here’s an example using the Perl dezi-client:

 % cat dezi-config.pl
 { engine_config => { auto_commit => 0 } }
 % dezi --dezi-config dezi-config.pl

 [ in a different terminal ]
 % dezi-client path/to/docs/*.xml
 % dezi-client --commit

The most efficient way to build an initial Dezi index of any significant size is to use the swish3 command-line tool on a local filesystem. But now you can use a Dezi client to add docs over HTTP at 3-4x the old rate. Plus, you can change your mind and rollback your changes:

 % dezi-client path/to/docs/*.xml
 % dezi-client --rollback

All this magic is part of the Search::OpenSearch::Engine::Lucy module, which implements the caching of the Indexer and adds 2 new methods in version 0.11: COMMIT() and ROLLBACK().

Happy indexing!