From dev-return-3034-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Sun Mar 01 12:01:37 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 28953 invoked from network); 1 Mar 2009 12:01:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2009 12:01:37 -0000 Received: (qmail 63717 invoked by uid 500); 1 Mar 2009 12:01:36 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 63676 invoked by uid 500); 1 Mar 2009 12:01:35 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 63665 invoked by uid 99); 1 Mar 2009 12:01:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2009 04:01:35 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2009 12:01:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B6D18234C48C for ; Sun, 1 Mar 2009 04:01:12 -0800 (PST) Message-ID: <70713398.1235908872739.JavaMail.jira@brutus> Date: Sun, 1 Mar 2009 04:01:12 -0800 (PST) From: "Louis Gerbarg (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Created: (COUCHDB-273) view rows should be able to include _rev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org view rows should be able to include _rev ---------------------------------------- Key: COUCHDB-273 URL: https://issues.apache.org/jira/browse/COUCHDB-273 Project: CouchDB Issue Type: Improvement Components: JavaScript View Server Reporter: Louis Gerbarg In our project we use maps in order to group objects, but do not generate any interesting any meaningful data to return from the mapping function aside from the sorted ordering. Our client basically does a GET against the view to determine what objects are in for a key. It has a local cache, and currently it then HEADs every object returned by that view to see if the objects need to be reloaded. If the rev was included in the row that would be unnecessary. Currently we are intending to return { "rev" : doc._rev } out of the mapping function, but the seems a bit clumsy. Jan suggested in irc that maybe the correct thing to do is to remove the "_id" from the roes by default and add both "_rev" and "_id" with an option (include_meta=true). This approach seems good to me, since I suspect people who are using views to manipulate the data in interesting ways generally don't need the object ids, and people who are using views primarily to organize objects almost always need the rev in addition to the object id. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.