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 4924575FE for ; Tue, 6 Sep 2011 22:44:53 +0000 (UTC) Received: (qmail 36200 invoked by uid 500); 6 Sep 2011 22:44:51 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 36092 invoked by uid 500); 6 Sep 2011 22:44:51 -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 35897 invoked by uid 99); 6 Sep 2011 22:44:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 22:44:50 +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 74.125.83.53 as permitted sender) Received: from [74.125.83.53] (HELO mail-gw0-f53.google.com) (74.125.83.53) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 22:44:41 +0000 Received: by gwj20 with SMTP id 20so2545916gwj.26 for ; Tue, 06 Sep 2011 15:44:20 -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=mSCb21VbKNXPKH6cIX84Xubr4Mx8+7lFmQtByvfIk0A=; b=wAOEIyIS5JgZe/pvyh8mQAz79x5wHsF9CbS+T9HPpXix8tJIOhzNdALaVgCxZTV6n8 RUxXGtbxAaynEZZp9T3S+gSjHi9596mKJED5x8qZxWVpGGcATRPGD/GzklpwzmlA5fYh ZZfZGJ5+vwxT0tI0f66g8zyJ4815YcSvs4WpA= Received: by 10.68.48.133 with SMTP id l5mr471298pbn.336.1315349060037; Tue, 06 Sep 2011 15:44:20 -0700 (PDT) Received: from [192.168.1.2] (ip98-185-255-2.sb.sd.cox.net. [98.185.255.2]) by mx.google.com with ESMTPS id i4sm263418pbr.4.2011.09.06.15.44.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Sep 2011 15:44:18 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Apple Message framework v1249) Subject: Re: startkey and endkey From: Andrey Cherkashin In-Reply-To: <33F4703E-06A7-46E4-97C1-350FCC12F9E4@gmail.com> Date: Tue, 6 Sep 2011 15:44:16 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <7DD82927-E595-4ED5-8420-9C09B0599F9B@gmail.com> References: <28EAF0D9-BC45-463B-AE57-B8C95E045C63@gmail.com> <5C1A6DAC-17E3-485D-8571-5AFE11A2A207@gmail.com> <825CEB7F-CBCF-4E63-8698-42B4D1CE3530@gmail.com> <33F4703E-06A7-46E4-97C1-350FCC12F9E4@gmail.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1249) X-Virus-Checked: Checked by ClamAV on apache.org It works, but only for keys in english, for example it will return = nothing if i query "=D0=9A=D1=80=D0=B0=D1=81=D0=BA=D0=B8". curl https://couch.dev/project_ngein-sac_dev/_design//Item/_view/filter = : = {"id":"Item--10-01.02-1211--624525","key":["\u0414\u0440\u0443\u0433\u043e= \u0435","\u0414\u0440\u0443\u0433\u043e\u0435","10-01.02-1211",0],"value":= null}, = {"id":"Item--10-01.01-1111--919678","key":["\u041a\u0440\u0430\u0441\u043a= \u0438","\u0432\u043d\u0435\u0448\u043d\u0438\u0435 = \u0440\u0430\u0431\u043e\u0442\u044b","10-01.01-1111",0],"value":null}, On Sep 1, 2011, at 3:11 AM, F=C3=A1bio Batalha wrote: >=20 >>> Try ?startkey=3D["Paint"]&endkey=3D["Paintz",{}] >=20 > Sent from my iPhone >=20 > On 31/08/2011, at 22:53, Andrey Cherkashin wrote: >=20 >> Any ideas? >> On Aug 30, 2011, at 3:48 AM, Robert Newson wrote: >>=20 >>> 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 >>=20