Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FD0810F49 for ; Mon, 24 Mar 2014 13:36:44 +0000 (UTC) Received: (qmail 96999 invoked by uid 500); 24 Mar 2014 13:36:43 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 96853 invoked by uid 500); 24 Mar 2014 13:36:34 -0000 Mailing-List: contact commits-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 commits@couchdb.apache.org Received: (qmail 96844 invoked by uid 99); 24 Mar 2014 13:36:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2014 13:36:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2014 13:36:30 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id C9970878; Mon, 24 Mar 2014 13:36:10 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Mon, 24 Mar 2014 13:36:10 -0000 Message-ID: <20140324133610.60241.95844@eos.apache.org> Subject: =?utf-8?q?=5BCouchdb_Wiki=5D_Update_of_=22View=5Fcollation=22_by_JoanTouz?= =?utf-8?q?et?= Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for c= hange notification. The "View_collation" page has been changed by JoanTouzet: https://wiki.apache.org/couchdb/View_collation?action=3Ddiff&rev1=3D18&rev2= =3D19 <> = =3D View Collation =3D + '''This page has been replaced by the official documentation''' '''at''' = http://docs.couchdb.org/en/latest/couchapp/views/collation.html. - = - See also the [[http://docs.couchdb.org/en/latest/couchapp/views/collation= .html]] for this topic. = <> = @@ -34, +33 @@ } } }}} + This trick was [[http://www.cmlenz.net/blog/2007/10/couchdb-joins.html|or= iginally documented]] by Christopher Lenz. See also [[http://stackoverflow.= com/questions/6064987/couchdb-map-reduce-how-to-output-less-rows/6066433#60= 66433|jhs answer on stackoverflow]] for more useful tips. - This trick was [[http://www.cmlenz.net/blog/2007/10/couchdb-joins.html|or= iginally documented]] by Christopher Lenz. - See also [[http://stackoverflow.com/questions/6064987/couchdb-map-reduce-= how-to-output-less-rows/6066433#6066433|jhs answer on stackoverflow]] for m= ore useful tips. = =3D=3D=3D Sorting by Dates =3D=3D=3D It maybe be convenient to store date attributes in a human readable forma= t (i.e. as a String), but still sort by date. This can be done by convertin= g the date to a number in the emit function. For example, given a document = with a created_at attribute of 'Wed Jul 23 16:29:21 +0100 2008', the follow= ing emit function would sort by date