Searching by non-key value

Yury Dorofeev u.dorofeev at gmail.com
Thu Feb 17 13:42:00 EST 2011


Hi!
 I have two questions. My first question is how to make the searching
process by non-key value efficient?
More details. I will use Erlang notation such as we are coding with Erlang:
we have Bucket = "User" which contains lots of users with Key =
username and  Value = [{"FirstName", value}, {"SecondName", value},
{"e-mail", value}].
I want to make a search "get all users whose FirstName='John' ". The
bucket "User" is huge! I do not want to get all the possible
objects(keys) from that bucket and apply Map and Reduce functions to
them AFTER. It will be extremely expensive! Is it possible to make
such a smart request without "post" request processing?

My second question is how to make a relation between 2 or more Buckets
and get the data from them in 1 request.
Example. Bucket = "User", Bucket="Department". One user can be
registered in many departments. I need to get information about all
departments for the certain user.
In SQL db this is not a problem. But I do not have an experience with
key-value store db.

Best regards, Yury Dorofeev
Uppsala University, Sweden




More information about the riak-users mailing list