incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus Ottosson <mag...@magnusottosson.se>
Subject Search for city by name, order by population
Date Mon, 12 Apr 2010 08:25:36 GMT
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

Mime
View raw message