简体   繁体   中英

Riak - How to get the ID of the current item in a Map function

Using Riak, how can I get the ID of the current item that's being processed in a Javascript map function?

function(v, kd, arg) {
    var element = v.values[0];
    var id = "??"; // How to get the ID of the current item
    return [id];
}

I've discovered how to do it:

function(v, kd, arg) {
    return [v.key];
}

I've found the source on: http://contrib.basho.com/get_keys.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM