From 2650122a1bea8859f50bf11a6606ddfb351452ed Mon Sep 17 00:00:00 2001 From: Alexander NeonXP Kiryukhin Date: Tue, 28 May 2019 11:53:28 +0300 Subject: Rebuild indexes, indexes only after import. Small speed boost --- models.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'models.go') diff --git a/models.go b/models.go index 1c7d0ee..c98ed2f 100644 --- a/models.go +++ b/models.go @@ -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"` +} -- cgit v1.2.3