Riak: Updated Examples For "Seven Databases in Seven Weeks"
In my last post, I showed you how to fix an example from from the "Seven Databases in Seven Weeks"
to run against Riak 1.1.4. This post shows a few more updates to the
book examples to get them to run against this more current version of
Riak.
Published at DZone with permission of Rodrigo De Castro, author and DZone MVB. (source)- Search Precommit: page 87 shows the command to install riak_search_kv_hook as a precommit script. Like in the last post, it must have the "language" property to work properly. Otherwise the property is not applied - and no error is returned by Riak. This is the command that works against Riak 1.1.4:
curl -i -X PUT http://localhost:8091/riak/animals -H "Content-Type: application/json" -d '{"props":{"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit","language":"erlang"}]}}'- Server port: pages 89 and 90 show command using "localhost:8098". It should read "localhost:8091". This is actually an erratum.
- Access secondary index: page 90 shows command how to access secondary index, but with that command, I get the error "Invalid link walk query submitted." The proper command for Riak 1.1.4 is:
curl http://localhost:8091/buckets/animals/index/mascot_bin/butler
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)
Tags:





