From user-return-11235-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Thu Jul 01 21:46:22 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 3471 invoked from network); 1 Jul 2010 21:46:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Jul 2010 21:46:22 -0000 Received: (qmail 60179 invoked by uid 500); 1 Jul 2010 21:46:21 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 60078 invoked by uid 500); 1 Jul 2010 21:46:20 -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 60068 invoked by uid 99); 1 Jul 2010 21:46:20 -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 21:46:20 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of robert.newson@gmail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jul 2010 21:46:12 +0000 Received: by fxm8 with SMTP id 8so2795209fxm.11 for ; Thu, 01 Jul 2010 14:45:52 -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 :content-transfer-encoding; bh=l/inNimjA1Z+TPtu3MgJbrrevsvodnWangrRKXW1gFQ=; b=TuT8kQBDqY3LYgU/4nBiNFAyyaMGD+bEH9RUi9G54DGFH3sYXxT9oRhpvc+1G/TKL4 v03u5xHd/btSTvOi6Mi49b83R11jKUl2Czt8H/Du9/ahDGw1ykqjQWtoL9aCyDOlo0Ug 7RT7xcjxmf09edpiz17+S0zneQwROI3AtwL50= 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:content-transfer-encoding; b=iwciXdR3KjQHX6+sHys8PoTbWf3JUjVH/ToAyuYBRvrLPpgV/yWkhzGN3Tw4mLTx4e CXU/vDMWni3xAlWc1rkoPdCB+BciiHnI6QTV/is+QDHXAQ9MQmAt02XhfjCSo3nYG4J5 MqEzAEtYfheB4XY911ER8plKruXg2RNdjypUw= MIME-Version: 1.0 Received: by 10.103.172.10 with SMTP id z10mr32484muo.44.1278020752500; Thu, 01 Jul 2010 14:45:52 -0700 (PDT) Received: by 10.103.224.9 with HTTP; Thu, 1 Jul 2010 14:45:52 -0700 (PDT) In-Reply-To: References: Date: Thu, 1 Jul 2010 22:45:52 +0100 Message-ID: Subject: Re: Newbie Question about View's Startkey Match (Forked) From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org You'll need to emit the last name first so that the items with the same last name sort together. function(doc) { emit([doc.lastname, doc.firstname], null); } and then query with ?startkey=3D["Afzali"]&endkey=3D["Afzali",{}] more simply; function(doc) { emit(doc.lastname, null); } and then query with ?key=3D"Afzali" B. On Thu, Jul 1, 2010 at 10:29 PM, afshin afzali wro= te: > Sorry, But I =A0don't know why list rejects my post!!! > > Ok, assume we have three object keys which emited by a view; > > { =A0"FirstName" : "Afshin", "LastName" : "Afzali" } > { =A0"FirstName" : "Omid", "LastName" : "Afzali" } > { =A0"FirstName" : "Ashkan", "LastName" : "Afzali" } > > I want to retreive all docs which have LastName =3D=3D "Afzali" > -- afshin >