I'm working with Geofire on Firebase, and based on the documentation I see that most people split the geohash and location nodes, like the image below
In this case, the geohash and location are joined by the key. The index is on the field geofire/geohash
.
But when the location data is not user data but instead static map data, and the location data will always be queried after finding the geohashed keys, is it really necessary to split into geofire and location groups? My geofire dataset will eventually have 5+ million keys, so scaling and performance is definitely an issue.
Here's my suggested data model:
geofire
- key_1234
-- geohash: "abcd"
-- latitude: "50.0"
-- longitude: "8.0"
-- name: "test point 1"
- key_5678
-- geohash: "defg"
-- latitude: "70.0"
-- longitude: "-1.0"
-- name: "test point 2"