From user-return-5227-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon Jun 22 02:09:46 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 31413 invoked from network); 22 Jun 2009 02:09:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jun 2009 02:09:46 -0000 Received: (qmail 27681 invoked by uid 500); 22 Jun 2009 02:09:56 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27628 invoked by uid 500); 22 Jun 2009 02:09:56 -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 27618 invoked by uid 99); 22 Jun 2009 02:09:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 02:09:55 +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 (nike.apache.org: domain of hhsuper@gmail.com designates 209.85.221.171 as permitted sender) Received: from [209.85.221.171] (HELO mail-qy0-f171.google.com) (209.85.221.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 02:09:46 +0000 Received: by qyk1 with SMTP id 1so3672911qyk.13 for ; Sun, 21 Jun 2009 19:09:25 -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=BKU2t+2LdO2KkGzN8Xb3girJM1hOI9BTh6uZF+TC518=; b=wYNrh5SBM5sAuYopoEuXM8P/0bT2RjJ+hQflGFUK4E/RXe98QQsTjW48mLh5FBzKlK YG194imzPNbAdeDu9hvb36tuOiQlkOuIluEWawz6sGtwbESiGiqOhYVYCU0RKflGTCeU 1hmbpObjB3na6DWx753pJDWQlNP6oqR+yt9mc= 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=QOnjrl8yI8NKAsTpAhKhd1o8HTiiLughTj+Xs/tLyfw0U4y/cDBz415LI8z7NYvYSv 08YxH10GYENY8EqDf70jhR5E/jMqv9114hy8aQGFaH+JbsqNQXaqXkX4tTXy/i36QKSG iqeaRg3vsmEfr+o5jDYyDXZBvU7/JOmdlvYzs= MIME-Version: 1.0 Received: by 10.224.28.84 with SMTP id l20mr4463829qac.72.1245636565327; Sun, 21 Jun 2009 19:09:25 -0700 (PDT) In-Reply-To: References: <69a992ac0906191748q160ac0fct5c26c408da593bbf@mail.gmail.com> <69a992ac0906191802l160d5937qf4b723bffd8c9928@mail.gmail.com> <69a992ac0906201915p5d3073l8af5812ed411d76d@mail.gmail.com> From: hhsuper Date: Mon, 22 Jun 2009 10:09:05 +0800 Message-ID: <69a992ac0906211909j71067dcg210e15006c6f80f4@mail.gmail.com> Subject: Re: view sorting and group question? To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015175cb0f2fee0b2046ce65cab X-Virus-Checked: Checked by ClamAV on apache.org --0015175cb0f2fee0b2046ce65cab Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit should i say that couchdb isn't for such usage? or i doesn't get the essence or couchdb doesn't impl this feature yet? On Sun, Jun 21, 2009 at 10:24 AM, Paul Davis wrote: > If you're trying to do something like a table that has sortable > columns, then yes, you're going to have to use multiple views for that > page. > > On Sat, Jun 20, 2009 at 10:15 PM, hhsuper wrote: > > 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 < > paul.joseph.davis@gmail.com > >> >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 > > > -- Yours sincerely Jack Su --0015175cb0f2fee0b2046ce65cab--