私には、特定の国のすべての都市を返すクエリがあります。都市別のソートのためのfreebase API関連性
これは、100の制限を避けるためにサイズや重要度順に並べ替えることを除いて、問題なく機能します。私は最初の100都市に、人が最初に選んだ可能性が最も高い都市を持たせたいと思います。 (?人口、または)
[{
"/location/country/iso3166_1_alpha2": "US",
"/location/location/contains":[
"id" : null,
"name" : null,
"/location/statistical_region/population" : { "number" : null, "date" : null }
"type" : "/location/citytown"
]
}]
これは動作しますが、それはすべて含まれている要素をカウントする必要があるため、非常に遅いです:
[{
"/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"
]
}]
私は/location/statistical_region/population
が、多くの幸運なしで、任意のアイデアを含めてみましたか?