Hi Brandon - The riak_object module exports a type() function that will return the bucket type of an object in Riak (https://github.com/basho/riak_kv/blob/develop/src/riak_object.erl#L589-L592).
MapReduce docs: http://docs.basho.com/riak/kv/2.1.4/developing/app-guide/advanced-mapreduce/ 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 Engineer lbak...@basho.com 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 riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com