Riak erlang stream_list_keys example
07 Aug 2011
I’m not sure how long ago I forgot about this, but I just remembered about a nice little feature when I wasmoving some data around on a Riak cluster. As the post title points out, this feature is streaming list keys in a bucket. Since I like to write lots of little helper code when messing around with data in Riak, this quick little example shows how riak_client:stream_list_keys() can work: -module(stream_keys). -export([stream_it/1]). stream_it(Bkt) -> %%...
Riak Postcommit Hooks
24 Mar 2011
Riak provides the ability to add functions on a per-bucket basis that will fire pre- and post-commit when updating a Riak bucket (deletes and inserts). Because deletes also fire the hooks, you will need to check if the X-Riak-Deleted entry exists. In my use-case for Riak, I am using the postcommit hook to create an indexing and sorting system for the content. Pre-commit hooks can either be Javascript or Erlang, but Postcommits can only be...
Riak/Riak Search: Setting bucket props and custom extractors
13 Oct 2010
Phew! That’s a long title for a blog post, but it describes both of two topics I want to write a quick post about when I was tinkering with Riak Search today. I was working on setting up some Basho Bench tests to check the performance of indexing with Riak Search, where the data inserted into the Riak bucket was a JSON object encoded using the mochijson module. After setting up my bucket indexing schema...