Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 58657 invoked from network); 12 Apr 2010 08:32:04 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Apr 2010 08:32:04 -0000 Received: (qmail 99886 invoked by uid 500); 12 Apr 2010 08:32:03 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 99778 invoked by uid 500); 12 Apr 2010 08:32:03 -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 99769 invoked by uid 99); 12 Apr 2010 08:32:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 08:32:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,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 sebastiancohnen@googlemail.com designates 209.85.218.221 as permitted sender) Received: from [209.85.218.221] (HELO mail-bw0-f221.google.com) (209.85.218.221) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 08:31:55 +0000 Received: by bwz21 with SMTP id 21so4101533bwz.35 for ; Mon, 12 Apr 2010 01:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=qz2P9cMTapY1t9th0bD89tz9AmVE3G+AuSOlJeu8F+E=; b=etcSa8/EkUojeNZ0ktHd8auqXJvIa1SEDWtsrqbJq9MsGpwv9l6lz5IVgIzJ+f3uCx 9LrChPMNJKXg1xucWQ4QXfW8rABxQ12GFMouM7le7EPWbiZ/oM/HhveLp+hfjkNvEDJW pypl6l5dvpSz6YzRwE1AYYwNEwlwLMpIYDsvo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=Hb4mmtSCkFJid80hvbGcVbAz6nxPhcfPNPLDfk9ApPeFkVZ2SBh+Y+PJ9lXXBBrpJz Ar+E8+m0xcgq6KSINpGZn2SlyoQMdTtSt5WSUsBN6XB9eN5+mMNTYkEcZqLIqRPo7Z3X pyMM/xPf9xwYc8/4R9j1tBcEaTnPLo/VgWfeg= Received: by 10.204.134.87 with SMTP id i23mr4376920bkt.125.1271061094434; Mon, 12 Apr 2010 01:31:34 -0700 (PDT) Received: from [192.168.0.152] (xdsl-78-34-185-15.netcologne.de [78.34.185.15]) by mx.google.com with ESMTPS id l1sm36104067bkl.14.2010.04.12.01.31.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Apr 2010 01:31:33 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) Subject: Re: Search for city by name, order by population From: Sebastian Cohnen In-Reply-To: Date: Mon, 12 Apr 2010 10:31:30 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <227A0267-AA3C-4E4A-B7BF-6E3DDBD19AED@googlemail.com> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1078) X-Virus-Checked: Checked by ClamAV on apache.org hmm, I do not quite follow... isn't the name of the city unique? what do = you mean by *searching* for a city? On 12.04.2010, at 10:25, Magnus Ottosson wrote: > Hi, >=20 > I have a database with the names and population of cities (about 7 > million entities). Is it possible, with couchdb, to create a key that > includes both cityname and population where I can search for a name > and get the matching results ordered by the population? >=20 > I tried to create a key like [population, name] and search like this > ?startkey=3D[0, "name"]&endkey=3D[10000000, "name]&limit=3D10 but it = does > not work like the way I hoped. >=20 > Any ideas? >=20 > Magnus