Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6404E7CE6 for ; Thu, 1 Sep 2011 01:54:58 +0000 (UTC) Received: (qmail 77118 invoked by uid 500); 1 Sep 2011 01:54:56 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 77085 invoked by uid 500); 1 Sep 2011 01:54: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 77077 invoked by uid 99); 1 Sep 2011 01:54:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 01:54:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andoriyu@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 01:54:46 +0000 Received: by yxi11 with SMTP id 11so94586yxi.11 for ; Wed, 31 Aug 2011 18:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=KVJwbgNt5kMe1mCNjk75sEG+8k22LSrNe3qmtZukcrQ=; b=P9KSNxyf4r5HmQ9qDNsly2KhlNBk3zEV2FV1EnciK357LAQZTU1mwBj+wygKpjWcdG LSqg+5aYjhqei5NNOtO2DsoYDF1Tn2WhUKTRsngQZrvaHPL4yb2oT6Wo565vkhySsk2A +udpqstNo7yD4jgGXxa+qCi1cVcu128rKRjhg= Received: by 10.68.59.133 with SMTP id z5mr433691pbq.503.1314842065123; Wed, 31 Aug 2011 18:54:25 -0700 (PDT) Received: from [192.168.1.7] (ip98-185-255-2.sb.sd.cox.net. [98.185.255.2]) by mx.google.com with ESMTPS id u2sm947437pbq.9.2011.08.31.18.54.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Aug 2011 18:54:22 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1249) Subject: Re: startkey and endkey From: Andrey Cherkashin In-Reply-To: Date: Wed, 31 Aug 2011 18:53:26 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <825CEB7F-CBCF-4E63-8698-42B4D1CE3530@gmail.com> References: <28EAF0D9-BC45-463B-AE57-B8C95E045C63@gmail.com> <5C1A6DAC-17E3-485D-8571-5AFE11A2A207@gmail.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1249) X-Virus-Checked: Checked by ClamAV on apache.org Any ideas? On Aug 30, 2011, at 3:48 AM, Robert Newson wrote: > Try ?startkey=3D["Paint"]&endkey=3D["Paint",{}] >=20 > B. >=20 > On 30 August 2011 08:52, Ganzha Alexey wrote: >> It looks like it will enough startkey=3D["Paint"]&endkey=3D["Paintz"] >> than for subcategory: ["Paint","Inside"]&endkey=3D["Paintz","Insidez"] >> or use '\u221e' instead of 'z' >>=20 >> On Tue, Aug 30, 2011 at 10:04 AM, Andrey Cherkashin = wrote: >>=20 >>> startkey=3D["Paint", " ", " ", 0] >>> endkey=3D["Paint", {}, {}, 0] >>>=20 >>> nothing. Btw, i'm trying to get all docs in one specific category, = then in >>> category and sub-category. >>> On Aug 29, 2011, at 11:58 PM, Ganzha Alexey wrote: >>>=20 >>>> Make Elements in startkey array the same type as keys emited. >>>> [string,string,string,int] >>>>=20 >>>> On Tue, Aug 30, 2011 at 9:49 AM, Andrey Cherkashin = >>> wrote: >>>>=20 >>>>> ["Paint", "Inside", "01-05.01-0002", 0] >>>>> ["Paint", "Inside", "01-05.01-0003", 0] >>>>> ["Paint", "Outside", "01-05.01-0004", 0] >>>>>=20 >>>>>=20 >>>>> On Aug 29, 2011, at 11:35 PM, Ganzha Alexey wrote: >>>>>=20 >>>>>> More details required. >>>>>> Drop here some rows from your view. >>>>>>=20 >>>>>> On Tue, Aug 30, 2011 at 9:29 AM, Andrey Cherkashin = >>>>> wrote: >>>>>>=20 >>>>>>> When I do exact match in start key and end key, i got 0 results. >>>>>>> On Aug 29, 2011, at 11:26 PM, Ganzha Alexey wrote: >>>>>>>=20 >>>>>>>> Hello. >>>>>>>> Your start key must match exactly some key in database. >>>>>>>> It is like an anchor. After db hits your start key, it begn = emit for >>>>> you >>>>>>> all >>>>>>>> rows with the key which is less than startkey according to view >>>>>>> collation. >>>>>>>>=20 >>>>>>>> On Tue, Aug 30, 2011 at 8:33 AM, Andrey Cherkashin < >>> andoriyu@gmail.com >>>>>>>> wrote: >>>>>>>>=20 >>>>>>>>> Hello everyone. >>>>>>>>>=20 >>>>>>>>> I have a problem with using couch views that has "complex" = keys >>> like: >>>>>>>>> ["Category", "sub-cat", "sku", 100] >>>>>>>>>=20 >>>>>>>>> For example, I trying to get all docs that is in "Paint" = category, >>> so >>>>> my >>>>>>>>> first guess was: >>>>>>>>> startkey=3D["Paint",0,0,0]&endkey=3D["Paint",{},{},{}] >>>>>>>>> but i got nothing. What am i doing wrong? >>>>>>>=20 >>>>>>>=20 >>>>>=20 >>>>>=20 >>>=20 >>>=20 >>=20