From f46266bce852fc599a77258b10fa33c59ccf512b Mon Sep 17 00:00:00 2001 From: JTrancender Date: Mon, 22 Aug 2022 10:17:34 +0800 Subject: [PATCH] fix: index name wrong (#12) --- internal/nsqconsumer/outputs/elasticsearch/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nsqconsumer/outputs/elasticsearch/client.go b/internal/nsqconsumer/outputs/elasticsearch/client.go index 4bd91bb..bb157eb 100644 --- a/internal/nsqconsumer/outputs/elasticsearch/client.go +++ b/internal/nsqconsumer/outputs/elasticsearch/client.go @@ -104,7 +104,7 @@ func (c *Client) Run(msgChan <-chan *message.Message) { func (c *Client) indexName(topic string) string { now := time.Now() - return strftime.Format(fmt.Sprintf("%s-%%&.%%m.%%d", topic), now) + return strftime.Format(fmt.Sprintf("%s-%%Y.%%m.%%d", topic), now) } func (c *Client) Publish(msgList []*message.Message) {