Just adding to what @MichelDiz said, you could also just build the tree in Dgraph using predicates (no facets). Because each node has a unique UID, even when city names are same, they will be represented using different nodes in Dgraph with different UID. You could then use a combination of root query and filters to find the correct node that you are interested in.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Support for composite primary keys | 26 | 4440 | January 6, 2022 | |
| Help with compound key | 1 | 764 | January 15, 2022 | |
| Dgraph supports composite indexes? | 4 | 1048 | August 4, 2019 | |
| Support composite indexes | 5 | 1357 | September 18, 2021 | |
| @id as the combination of two things (composite index) | 20 | 2650 | January 7, 2022 |