On 15/06/2010 2:33 PM, Lowry, Matthew wrote:
Reading between the lines, I get the impression that the answer to my
question is "No - the view API does not support fetching keys without
values." This is a pity. And strangely inconsistent with the document
API, in my opinion. The document API allows me to fetch references to
documents without fetching the documents themselves. All the reasons
that motivate the existence of this in the document API are also present
when interacting with views. I can't see any reason why the view API
shouldn't let me fetch references to the values in a view without
fetching the values themselves.
A pity, sure. :-)
Inconsistent? No... consider '_all_docs' to be congruent with a view
where emit(doc._id, {'rev':doc._rev}) is called on each document.
You can't avoid fetching the value for _all_docs - it's just that
'value' and 'document' are not the same thing.
-Patrick