0

Is it possible to search for records in RIAK based on time intervals? Such as pulling out the most recent records for the past 7 days.

Ie, from MySQL:

WHERE DATE(edit_date) = DATE_SUB(CURDATE(), INTERVAL 7 DAY)
revert
  • 49
  • 3

1 Answers1

0

You should use a 2i index to record the edit time for each record. Add these as UNIX timestamps. Then it's simple to query between two integers when looking up records.

mafrosis
  • 2,720
  • 1
  • 25
  • 34