I'm fairly new to couch myself, but here goes: You could use a list function that would crop the values and leave the keys.
Also, you could write a reduce function that does the same - just query the view with 'group=true' so each view-doc gets its own reduce. a. On 15 June 2010 05:26, Lowry, Matthew <[email protected]> wrote: > Hi folks. A Couch newbie here with a question regarding the view API. > > Is there any way that I can query a view and get just the key for each > row, and omit the value? > > The reason I ask is I'm working with a view that generates a massive > amount of data - each document in the database generates many hundreds > of rows in the view. Each row has a large value object. But all I want > to do is get the keys. So it's wasting a massive amount of time and > resources, both client and server side, to have to pull both the key and > value object for every row in the view when all I want to see is the > key. > > So is there actually a mechanism in the view API to pull just the key > from each row of a view? And if not, why not? That would be curiously > asymmetrical with the document API, which allows me to get the IDs of > all the documents without requesting the documents themselves. > > Cheers. > > IMPORTANT: This email remains the property of the Department of Defence and > is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you > have received this email in error, you are requested to contact the sender > and delete the email. >
