Skip to content

Commit

Permalink
add date formate#
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikki committed Jul 9, 2022
1 parent 3eb127b commit 662bdbb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ func (m *MappingClient) genMapping(model_struct any) (out *MappData, out_err err
if es_type == "keyword" {
tmp["ignore_above"] = m.above
}
if es_type == "date" {
tmp["format"] = "yyyy-MM-dd HH:mm:ss"
}
data.Mappings.Properties[tag] = tmp
}
return data, nil
Expand Down

0 comments on commit 662bdbb

Please sign in to comment.