Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 76280 invoked from network); 21 Jun 2009 02:16:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jun 2009 02:16:09 -0000 Received: (qmail 82290 invoked by uid 500); 21 Jun 2009 02:16:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 82209 invoked by uid 500); 21 Jun 2009 02:16:19 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 82199 invoked by uid 99); 21 Jun 2009 02:16:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jun 2009 02:16:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hhsuper@gmail.com designates 209.85.222.171 as permitted sender) Received: from [209.85.222.171] (HELO mail-pz0-f171.google.com) (209.85.222.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jun 2009 02:16:11 +0000 Received: by pzk1 with SMTP id 1so883772pzk.13 for ; Sat, 20 Jun 2009 19:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=qBV8ar6Odme62bEpUlEdlNEYEh/ncgXOZeq+nuYOoqY=; b=qhnkFmWv3I3Q2keP00UeXtHpiLaoPRiuxdRe6DjWV1a99nvGzJqnoTMaUhFFfbhYc8 dU207KUjiOYDTVqif6wbsNpUAFoL9JtIlOhSwi+pmeKCFFOsYM3qDZZ6sx7J88SZpnXS czmqpMTehF8VDeeHdMVDMzpfxpvQoPMVV/nrg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=p1xOA9XxwXoYtlaBQYYViQZpuTn7ajRGRb0JoEk64A85g0bXpsN0xEfM8E3ou9pfjr DKD5eKAW0mnjNRR3GzucfWZBikWC15wJHjtSvE3QTYLJCNEWBT2YV0DKS0e/Nn+nZ9HB LMzx/1nzLTLjK8/Sx2OT6x1CTvx91DZN9X4C0= MIME-Version: 1.0 Received: by 10.140.132.4 with SMTP id f4mr3102676rvd.38.1245550551080; Sat, 20 Jun 2009 19:15:51 -0700 (PDT) In-Reply-To: References: <69a992ac0906191748q160ac0fct5c26c408da593bbf@mail.gmail.com> <69a992ac0906191802l160d5937qf4b723bffd8c9928@mail.gmail.com> From: hhsuper Date: Sun, 21 Jun 2009 10:15:31 +0800 Message-ID: <69a992ac0906201915p5d3073l8af5812ed411d76d@mail.gmail.com> Subject: Re: view sorting and group question? To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd2903a259ef1046cd2563d X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd2903a259ef1046cd2563d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit but if i need to use the view as a datasource to the web page, i need change to right view to query on every sorting? On Sun, Jun 21, 2009 at 3:42 AM, Paul Davis wrote: > On Fri, Jun 19, 2009 at 9:02 PM, hhsuper wrote: > > thanks paul, > > > > do you mean i need another view to resolve this, the difference between > them > > are the key order? > > > > Yeah, if you're wanting to 'resort' a view, the CouchDB way is to > create a second view for each 'sort order'. > > HTH, > Paul Davis > > > i mean i want to group or sort not with start at the first key, could i > > achieve this goal in only view? > > > > On Sat, Jun 20, 2009 at 8:51 AM, Paul Davis >wrote: > > > >> If you want different key sorting then you'll need to emit different > >> keys. The same goes for grouping differently. > >> > >> Paul Davis > >> > >> On Fri, Jun 19, 2009 at 8:48 PM, hhsuper wrote: > >> > Hi, my view return structure like this: > >> > > >> > > >> > "key":["1","10075","351"],"value":{"count":27420,"score":2085790,"grade":76.06819839533188} > >> > > >> > > >> > the key column refer to userid, dialogid and seesionid, i know i can > >> group > >> > with userid or with userid, dialogid, but how can i group with > >> > dialogid or dialogid, > >> > sessionid? > >> > also about the sorting, the default is using all key, how can i > sorting > >> only > >> > with userid or only with dialogid? > >> > > >> > give some suggestion pls. > >> > > >> > -- > >> > Yours sincerely > >> > > >> > Jack Su > >> > > >> > > > > > > > > -- > > Yours sincerely > > > > Jack Su > > > -- Yours sincerely Jack Su --000e0cd2903a259ef1046cd2563d--