Closed cranic closed 10 years ago
Well you don't get the metadata for each document but one meta data object. Getall internally runs a mapreduce something like
curl -XPOST http://localhost:8098/mapred \
-H 'Content-Type: application/json' \
-d '{"inputs": "test_data", "query":[{"map": {"language": "javascript","source": "Riak.mapValuesJson"}}] }'
on the shell would give you. If you need to get the metadata for each object you would have to get each object, or at least make a head request, so like
db.exists("bucket", "key", function(err, res, meta) { console.log(meta) })
for each key.
Hello there,
The documentation of getAll says that it returns an array of objects with the data and de meta of the document, but running getAll all I can see is the data of the document.
How can I grab the metadata of each document?