Hi Rajat,
I would construct two secondary indexes (2i) when Post objects are created in 
the form of

  *   userid_timestampOfPost
  *   timestampOfPost

This gives you the ability to do a range query for posts created by a specific 
user and a general range query to posts by all users made within a certain time 
frame.

2i queries in Riak only return the keys to the objects matching the query. You 
can use a 2i query as an input to a mapreduce job.

For futher reading see http://wiki.basho.com/Secondary-Indexes.html

/F

________________________________
From: riak-users-boun...@lists.basho.com [riak-users-boun...@lists.basho.com] 
on behalf of Rajat Mathur [rajatmath...@gmail.com]
Sent: Wednesday, February 22, 2012 9:17 AM
To: riak-users@lists.basho.com
Subject: Querying [Filter Search]

Considering I have Buckets for Users and Posts and I want to get users posts in 
last 24 hours, how should I go about it.
Post's json data has a key postTime. How to filter search based on value's key 
value ?

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

Reply via email to