diff options
author | Alexander NeonXP Kiryukhin <a.kiryukhin@mail.ru> | 2019-05-28 11:53:28 +0300 |
---|---|---|
committer | Alexander NeonXP Kiryukhin <a.kiryukhin@mail.ru> | 2019-05-28 11:53:28 +0300 |
commit | 2650122a1bea8859f50bf11a6606ddfb351452ed (patch) | |
tree | 20292582263561d63faee5477cdfde8e8ce38ac4 /models.go | |
parent | 7a2c6b69dc70e849de4ca54b2767c91ad0accf97 (diff) |
Rebuild indexes, indexes only after import. Small speed boost
Diffstat (limited to 'models.go')
-rw-r--r-- | models.go | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -19,7 +19,7 @@ type Node struct { Visible bool `bson:"visible"` Version int `bson:"version,omitempty"` Timestamp time.Time `bson:"timestamp"` - Tags map[string]string `bson:"tags,omitempty"` + Tags []Tag `bson:"tags,omitempty"` Location Coords `bson:"location"` } @@ -30,7 +30,7 @@ type Way struct { Version int `bson:"version"` Timestamp time.Time `bson:"timestamp"` Nodes []int64 `bson:"nodes"` - Tags map[string]string `bson:"tags"` + Tags []Tag `bson:"tags"` } type Relation struct { @@ -40,7 +40,7 @@ type Relation struct { Version int `bson:"version"` Timestamp time.Time `bson:"timestamp"` Members []Member `bson:"members"` - Tags map[string]string `bson:"tags"` + Tags []Tag `bson:"tags"` } type Member struct { @@ -55,3 +55,8 @@ type Member struct { // Only valid for multipolygon or boundary relations. Orientation orb.Orientation `bson:"orienation,omitempty"` } + +type Tag struct { + Key string `bson:"key"` + Value string `bson:"value"` +} |