newbie data modeling questions

Daniil Churikov ddosia at gmail.com
Tue May 1 12:26:10 EDT 2012


I think i was wrong little bit. You will have to make 2 indexes for such
types of query:
1) built in index with special name <<"$key">> will be Mac + timestamp, you
will be able to find all objects for device foo between timestamp bar and
baz:
C:get_index(Bucket, {range, <<"$key">>, <<"001122AABBCC-0001",
KeyFrom/binary>>, <<"001122AABBCC-0001", KeyTo/binary>>}).
2) make a vice-versa index <<Timestamp/binary,
"001122AABBCC-0001">> and by this index you could find all objects
for *any* device between timestamp bar and baz.
Also as it will be putted into one bucket you could easily manage N, R, W
props for this bucket, rather dynamicly do sanity checks.

--
View this message in context: http://riak-users.197444.n3.nabble.com/newbie-data-modeling-questions-tp3951726p3953205.html
Sent from the Riak Users mailing list archive at Nabble.com.




More information about the riak-users mailing list