aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-04-27 17:27:01 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-04-27 17:27:01 +0200
commitb94f2da7ff040a91eb9fd5b6b1eba64b997954fa (patch)
tree36ba0d622c11c3946b14d0eab2ed4c2795e290b3
parent320e053303f06b363af7f1f8e3e85c4979afd17d (diff)
downloadrefcat-b94f2da7ff040a91eb9fd5b6b1eba64b997954fa.tar.gz
refcat-b94f2da7ff040a91eb9fd5b6b1eba64b997954fa.zip
make ts a string
-rw-r--r--skate/cmd/skate-bref-id/main.go2
-rw-r--r--skate/schema.go2
2 files changed, 2 insertions, 2 deletions
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"`