Use another bucket, keyed by email, with the users generated ID as the value:

Bucket/key: buckets/users-by-email/bob.bar...@gmail.com
Value: Riak generated ID

There are, I am sure, race conditions and eventual consistency issues
to keep in mind, but it's good to remember that you can use key/value
operations in this manner.

--
Luke Bakken
Engineer
lbak...@basho.com

On Fri, Sep 4, 2015 at 3:04 AM, Hao <jusf...@163.com> wrote:
> Take registration for example, within 1 second, how could I find out the
> same user already registered in the database? Suppose the email address is
> the ID but is not the key. KEY is generated guid.
>
> (I have been suggested to use the email address as the key. But it's a big
> change. I just want to make sure that there is really no other way)
>
> Thanks,
>
> --
> Hao

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to