Simple questions

Bryan Fink bryan at
Wed Jan 13 15:50:36 EST 2010

On Tue, Jan 12, 2010 at 9:38 AM, Dmitrii Dimandt <dmitriid at> wrote:
> 1. Is jiak_client:set_bucket(<<"bucketname">>, [{bucket_mod, some_module}]) still valid? If yes, what happens if this module isn't found?

Yes, bucket_mod is still valid for the Jiak interface.  If that module
isn't found, you'll see {error, undef, …} errors when making requests
through the Jiak web service.

> 2. Is the only way to have an "order by" is to run a M/R job, save results to a bucket and retrieve these results from that bucket?

Correct.  No "order by" logic is built into Riak.  To get similar
behavior, you'll need an appropriate reduce phase in a map/reduce
query, or logic that sorts the query result.

> 3. Is there a way to get an object not just by key, but some other field (some sort of a WHERE clause). Or is it a job for M/R again? :)

Get operations are by bucket/key-pair only.  Except for the Jiak
interface, Riak is oblivious to the content of the objects stored.
So, yes, you'll either need more map/reduce or an application-built
index to lookup objects by the data they contain.


More information about the riak-users mailing list