Hi Brandon -

The riak_object module exports a type() function that will return the
bucket type of an object in Riak

MapReduce docs:

In addition, here is a repository containing some exampe map/reduce
code: https://github.com/basho/riak_function_contrib/wiki

Having said all that, your use case may be better suited to Riak
Search. MapReduce is best run on an intermittent basis due to the load
it places on a cluster. Is your query something that will frequently
be run or could the output of the query be saved in Riak on a daily
basis, for instance?

Luke Bakken

On Thu, Sep 29, 2016 at 5:57 PM, Brandon Martin <zmbmar...@gmail.com> wrote:
> So I am trying to figure out how to do a map reduce on a bucket type with
> the erlang client in erl. I didn’t see in the documentation how to do a map
> reduce with a bucket type. I have the bucket type and the bucket. I want to
> map reduce to basically filter out any documents whose createTime(which is
> just int/number) is less then 24 hours and return those. I have only been
> using riak for a few weeks and erlang for about a day. Any pointers or help
> would be appreciated.
> Thanks
> --
> Brandon Martin

riak-users mailing list

Reply via email to