couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Cohnen <>
Subject Re: Search for city by name, order by population
Date Mon, 12 Apr 2010 08:31:30 GMT
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,
> 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?
> I tried to create a key like [population, name] and search like this
> ?startkey=[0, "name"]&endkey=[10000000, "name]&limit=10 but it does
> not work like the way I hoped.
> Any ideas?
> Magnus

View raw message