YaroslavPodorvanov / golang-struct-to-elastic-mapping

https://github.com/olivere/elastic/issues/694
MIT License
14 stars 3 forks source link

Tags #5

Closed YaroslavPodorvanov closed 2 years ago

YaroslavPodorvanov commented 2 years ago
type Company struct {
    ID          int    `json:"id" es:"name:id,type:integer,index:true"`
    Alias       string `json:"alias" es:"name:alias,type:keyword,index:true"`
    Name        string `json:"name" es:"name:name,type:text,index:true"`
    Description string `json:"description" es:"name:description,type:text,index:true"`
}