incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarrod Roberson <jar...@vertigrated.com>
Subject Re: Can I get just the keys from a view? [SEC=UNCLASSIFIED]
Date Tue, 15 Jun 2010 02:43:54 GMT
On Mon, Jun 14, 2010 at 10:26 PM, Lowry, Matthew <
Matthew.Lowry@dsto.defence.gov.au> 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.
>

don't emit the keys as part of the view, just emit null.

IMPORTANT: Also this email remains the property of ME! If you are reading
this, then pretend you didn't and delete it and all copies you find on the
internet as well and notify me that I screwed up and posted something
sensitive on a PUBLIC mailing list on the PUBLIC internet and expected it to
stay private, or for people reading it in FOREIGN countries to care about
your silly disclaimers on emails sent to said, public international internet
lis. Especially when they can't even spell the word Defense. :-)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message