Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 84546 invoked from network); 1 Jul 2010 20:53:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Jul 2010 20:53:16 -0000 Received: (qmail 79973 invoked by uid 500); 1 Jul 2010 20:53:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 79929 invoked by uid 500); 1 Jul 2010 20:53:15 -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 79921 invoked by uid 99); 1 Jul 2010 20:53:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jul 2010 20:53:15 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of a.afzali2003@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jul 2010 20:53:07 +0000 Received: by bwz17 with SMTP id 17so2411177bwz.11 for ; Thu, 01 Jul 2010 13:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=OEPj/jwWYA9K9CUsD1NJ77WVNhaxkc/Dr5pQtlcGnoE=; b=bJ/OBMhpqO3hlpGmTH5KlEtAf8SlKIPX9NHPQeQCGmmKzeSrN7nI8fRf3VXAVvG/2i iQjnsA5Tl14+HuQFZBsq6CqrU6HLBYO8XNBiwO6rmq54vqUOLZub89hGWSmoSWYyU4fS 0L3e2fzRE9LO7mivL1VI4NR5Bgre9YbvVfV9Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dyOnoKIcT5G7TYCms+Z1DPbGM0Av8GD9NIOb2qTLjLdYXKmslHkrvGTHcDA84D4Rhv JDJkYvSMEc5wOQ0q7UUp5jx5MKgLnM9PlqREgDWnbsmYaFcQSXNSYQFrin/9vAY0YfMA uUUZQoXw4WBEPF9FlahJNMwmGmFeuQf7XIs5o= MIME-Version: 1.0 Received: by 10.204.140.19 with SMTP id g19mr20143bku.121.1278017507456; Thu, 01 Jul 2010 13:51:47 -0700 (PDT) Received: by 10.204.65.2 with HTTP; Thu, 1 Jul 2010 13:51:47 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Jul 2010 01:21:47 +0430 Message-ID: Subject: Re: Newbie Question about View's Startkey Match From: afshin afzali To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015174be3648c791b048a59a31f X-Virus-Checked: Checked by ClamAV on apache.org --0015174be3648c791b048a59a31f Content-Type: text/plain; charset=ISO-8859-1 Yes, It is. The thing caused to ask you about that assumptions is, If I for example emit an object key which contains many members (strings, objects, arrays ,...) , in the case of don't care member, what should be place for that member? ("" for a string member, {} for a object member and [] for a array member) -- afshin On Fri, Jul 2, 2010 at 1:00 AM, Zachary Zolton wrote: > Afshin, > > Well, if you want to just get a certain "slice" of a view's key space, > you'll want to use both the startkey and endkey parameters. > > For instance, if you just want all the view rows where the key > contains an array, try this: > > startkey=[]&endkey={} > > Any array value (e.g. ["foo"] or ["foo","bar"]) will collate at or > after the empty array (i.e. []), and since in this example you don't > want any object keys coming through we stop at the empty object (i.e. > {}). > > Is this any clearer? > > -Zach > > On Thu, Jul 1, 2010 at 3:04 PM, afshin afzali > wrote: > > Thank you, I've saw this page already. My question is based on that page. > > Are you confirm my assumtions ? > > > > > > > > > > On Fri, Jul 2, 2010 at 12:26 AM, Zachary Zolton < > zachary.zolton@gmail.com>wrote: > > > >> Here's the overall ordering of collation: > >> http://wiki.apache.org/couchdb/View_collation#Collation_Specification > >> > >> On Thu, Jul 1, 2010 at 2:31 PM, afshin afzali > >> wrote: > >> > Hi Guys, > >> > > >> > These are some simple assumptions which I would be confirmed when > using > >> in > >> > startkey param: > >> > > >> > 1) {} matches all object keys ( including {} ) > >> > 2) [] matches all array keys (including [] ) > >> > 3) "" (null string) matches all string keys (including "") > >> > 4) {} at the end of complex key matches all of remained ones > >> > > >> > BEST > >> > -- afshin > >> > > >> > > > --0015174be3648c791b048a59a31f--