On Thu, Dec 6, 2012 at 12:22 PM, Barry Ryan <barry.r...@bjss.com> wrote:
> I’m trying to use the output of a secondary index as the input to my
> mapreduce function which is written in javascript using the HTTP API to
> interact with Riak.  I found on the Riak web-site that it is possible:  'If
> you've enabled Secondary Indexes, the list of inputs can also reference a
> Secondary Index query'.  However, I couldn’t find anywhere that explained
> how you would do that or what it would look like.

Hi, Barry. That wording is a little confusing … instead of a list, the
"inputs" field should be a JSON object like:

    {"bucket":"mybucket",
     "index":"myindex_bin",
     "key":"my exact match"}

or

    {"bucket":"mybucket",
     "index":"myindex_int",
     "start":0
     "end":100}

More complete examples are near the bottom of
http://docs.basho.com/riak/latest/tutorials/Secondary-Indexes---Examples/

-Bryan

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

Reply via email to