mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-10 08:32:26 +08:00
chore: tags use array
This commit is contained in:
@@ -111,13 +111,12 @@ func ElasticAddIndex(article *model.Article) error {
|
||||
return err
|
||||
}
|
||||
|
||||
tags := strings.Split(article.Tags, ",")
|
||||
img := tools.PickFirstImage(article.Content)
|
||||
mapping := map[string]interface{}{
|
||||
"title": article.Title,
|
||||
"content": tools.IgnoreHtmlTag(article.Content),
|
||||
"slug": article.Slug,
|
||||
"tag": tags,
|
||||
"tag": article.Tags,
|
||||
"img": img,
|
||||
"date": article.CreatedAt,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user