Re: How to deal with 1 second indexing requirement in Riak Search 2.0

2015-09-05 Thread Hao
I actually start to wonder even using key/value (email_address as the key) to query the record(during registration), will it be still possibility that the two request is too close(client fired 2 sequential requests) and the second will still find no registration of the user because the 1st requ

Re: How to deal with 1 second indexing requirement in Riak Search 2.0

2015-09-04 Thread Dmitri Zagidulin
I second what Luke said. Definitely use Key/Value operations for this case (the users-by-email bucket), which is a One-to-One relationship. Don't use Search or Secondary Indexes. On Fri, Sep 4, 2015 at 9:18 AM, Luke Bakken wrote: > Use another bucket, keyed by email, with the users generated ID

Re: How to deal with 1 second indexing requirement in Riak Search 2.0

2015-09-04 Thread Luke Bakken
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/valu

Re: How to deal with 1 second indexing requirement in Riak Search 2.0

2015-09-04 Thread Roland Karlsson
You have secondary index and Riak Search http://docs.basho.com/riak/latest/dev/using/2i/ http://docs.basho.com/riak/latest/dev/using/search/ On 2015-09-04 12:04, Hao wrote: Take registration for example, within 1 second, how could I find out the same user already registered in the database? Su

How to deal with 1 second indexing requirement in Riak Search 2.0

2015-09-04 Thread Hao
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 t