Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 47434 invoked from network); 22 Dec 2008 03:27:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Dec 2008 03:27:38 -0000 Received: (qmail 7572 invoked by uid 500); 22 Dec 2008 03:27:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 7543 invoked by uid 500); 22 Dec 2008 03:27:36 -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 7532 invoked by uid 99); 22 Dec 2008 03:27:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Dec 2008 19:27:36 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of webjogger@gmail.com designates 209.85.198.225 as permitted sender) Received: from [209.85.198.225] (HELO rv-out-0506.google.com) (209.85.198.225) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2008 03:27:30 +0000 Received: by rv-out-0506.google.com with SMTP id g37so1783803rvb.35 for ; Sun, 21 Dec 2008 19:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=GVofTzwFDfxnx+wIsXjvP7rpsMwt1QWTNTnZzm0BaMY=; b=FXfR+a+p2t30TIb6n84H71V4HIPsjZsnwJQLF264MR7wPMawwqF0KD9ifPW6FcFMrD fJ2Y1Ynne+S/oHiop7XN5Ch8UVKPW4XoeoA/x9jCxnYQHUGRd02OmJeFtPxWphjE7ker NPZ29JiRBZ2Jwt6D8pTbCvXFvgj84WubAKdVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=gtIR2OcxYEuPmqmkBRMLrFJUD+zLin9WhG6xbv+Ci47DlQZtpLITZdstn/5Pm97Nry P29wLd8XHujiN3KSxoa1Y0OuLDXr6j4NdA85az707be8nwzGgWiRLJVtycrjP7X/9kls yKqio/SZ/G86AAMlE+TgVGbOxtfRl3RGc2jyI= Received: by 10.141.84.5 with SMTP id m5mr2944339rvl.175.1229916429922; Sun, 21 Dec 2008 19:27:09 -0800 (PST) Received: by 10.141.153.4 with HTTP; Sun, 21 Dec 2008 19:27:09 -0800 (PST) Message-ID: <4c69d7170812211927l78457bf2hb0998e4c261e057b@mail.gmail.com> Date: Sun, 21 Dec 2008 19:27:09 -0800 From: "paul jobs" To: user@couchdb.apache.org Subject: Re: clustering based on 2 columns In-Reply-To: <4c69d7170812211916p4f6fd16er2e45d06e5cbaa42d@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_59099_8543283.1229916429914" References: <4c69d7170812211449w7b36084dh2e0706ee693bdc6@mail.gmail.com> <2583A30D-5B9C-4426-BCB2-4D736FDD7EAD@gmail.com> <4c69d7170812211912p779b77fexf44cd213603bd4a0@mail.gmail.com> <4c69d7170812211916p4f6fd16er2e45d06e5cbaa42d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_59099_8543283.1229916429914 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline function(doc) { if(doc.date=="2008-12-21") emit(doc.appname, doc.count); } this is the query i need but this is not a view since it uses the value so how do i make this a view and use it thanks On Sun, Dec 21, 2008 at 7:16 PM, paul jobs wrote: > Key > Value *["animgifts", "2008-12-20"]*10420*["animgifts", "2008-12-21"]* > 87781*["anoninbox", "2008-12-20"]*67*["anoninbox", "2008-12-21"]* 31*["areucute", > "2008-12-20"]*434*["areucute", "2008-12-21"]* 680*["bdayecards", > "2008-12-20"]*3175*["bdayecards", "2008-12-21"]* 12447*["crushometer", > "2008-12-20"]*69*["crushometer", "2008-12-21"]* 250*["datevalentine", > "2008-12-20"]*166*["datevalentine", "2008-12-21"]* 635*["igarden", > "2008-12-20"]*16*["igarden", "2008-12-21"]* 42*["luvgifts", "2008-12-20"]* > 72*["luvgifts", "2008-12-21"]* 81*["newstickers", "2008-12-20"]*123*["newstickers", > "2008-12-21"]* 582*["ownmenow", "2008-12-20"]*37*["ownmenow", > "2008-12-21"]* 72*["searchsharer", "2008-12-20"]*57*["searchsharer", > "2008-12-21"]* 336*["searchy", "2008-12-21"]*16*["sendlovely", > "2008-12-20"]* 239*["sendlovely", "2008-12-21"]*721*["topbffs", > "2008-12-20"]* 40*["topbffs", "2008-12-21"]*22*["ukissme", "2008-12-20"]* > 2939*["ukissme", "2008-12-21"]*9484 ← Previous Page | Rows per page: 10 > 25 50 100 | Next Page → > Showing 1-29 of 29 rows > *map3*:function(doc) { > emit([doc.appname,doc.date], doc.count); } > *reduce*:function(keys, values) { return sum(values)} > > in this > /invites/_view/invites/appdatecount?count=100&group=true&key="2008-12-21" > > or > /invites/_view/invites/appdatecount?count=100&group=true&key=["2008-12-21"] > > or > /invites/_view/invites/appdatecount?count=100&group=true&key=[,"2008-12-21"] > > gives rows=[] > > so how 2 query on a particular date > > > On Sun, Dec 21, 2008 at 7:12 PM, paul jobs wrote: > >> how to query this for a particular say day?and is it possible to pass key >> arguments in the futon view interface when we run the view >> >> >> On Sun, Dec 21, 2008 at 4:37 PM, Antony Blakey wrote: >> >>> >>> On 22/12/2008, at 9:19 AM, paul jobs wrote: >>> >>> I want to do what map2 does but only for say "2008-12-21" ie today >>>> how do i get today's statistics? >>>> >>> >>> Split your date into three components and use them as the key e.g. >>> >>> [doc.appname, doc.date.year, doc.date.month, doc.date.day] >>> >>> This will allow you to get partial reduce results for just one day, or >>> month, or year. >>> >>> Antony Blakey >>> -------------------------- >>> CTO, Linkuistics Pty Ltd >>> Ph: 0438 840 787 >>> >>> Reflecting on W.H. Auden's contemplation of 'necessary murders' in the >>> Spanish Civil War, George Orwell wrote that such amorality was only really >>> possible, 'if you are the kind of person who is always somewhere else when >>> the trigger is pulled'. >>> -- John Birmingham, "Appeasing Jakarta" >>> >>> >>> >> > ------=_Part_59099_8543283.1229916429914--