From b94f2da7ff040a91eb9fd5b6b1eba64b997954fa Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 27 Apr 2021 17:27:01 +0200 Subject: make ts a string --- skate/cmd/skate-bref-id/main.go | 2 +- skate/schema.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'skate') diff --git a/skate/cmd/skate-bref-id/main.go b/skate/cmd/skate-bref-id/main.go index fd2431d..c4bdb91 100644 --- a/skate/cmd/skate-bref-id/main.go +++ b/skate/cmd/skate-bref-id/main.go @@ -28,7 +28,7 @@ func main() { return nil, err } bref.Key = fmt.Sprintf("%s_%d", bref.SourceReleaseIdent, bref.RefIndex) - bref.IndexedTs = time.Now().Unix() + bref.IndexedTs = time.Now().Format(time.RFC3339) b, err := json.Marshal(bref) b = append(b, newlineB...) return b, err diff --git a/skate/schema.go b/skate/schema.go index ad28389..1dd02d9 100644 --- a/skate/schema.go +++ b/skate/schema.go @@ -208,7 +208,7 @@ type Sitemap struct { // BiblioRef as a prototype for indexing, https://is.gd/yicTom. type BiblioRef struct { Key string `json:"_id,omitempty"` - IndexedTs int64 `json:"indexed_ts,omitempty"` // XXX: maybe: epoch_millis, https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html + IndexedTs string `json:"indexed_ts,omitempty"` // XXX: maybe: "epoch_millis", https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html SourceReleaseIdent string `json:"source_release_ident,omitempty"` SourceWorkIdent string `json:"source_work_ident,omitempty"` SourceWikipediaArticle string `json:"source_wikipedia_article,omitempty"` -- cgit v1.2.3