I have a query where I would like to return all the cities for a given country.
That works fine except I would like to also tweak so to sort it by size or any order of significance to avoid the 100 limit. I would like the first 100 cities to have the most likely cities a person might choose listed first. (population, or?)
[{
"/location/country/iso3166_1_alpha2": "US",
"/location/location/contains":[
"id" : null,
"name" : null,
"/location/statistical_region/population" : { "number" : null, "date" : null }
"type" : "/location/citytown"
]
}]
This works but is very slow as it has to count all the contained elements:
[{
"/location/country/iso3166_1_alpha2": "US",
"/location/location/contains":[
"id" : null,
"name" : null,
"type" : "/location/citytown",
"/location/location/contains":{"return": "count"}
"sort": "-/location/location/contains.count"
]
}]
I tried including /location/statistical_region/population
but without much luck, any ideas?