fix tags mapping
This commit is contained in:
parent
454319b8d4
commit
1658b02926
|
@ -9,8 +9,8 @@ type User struct {
|
||||||
Name string `json:"name" elastic_mapping:"name:{type:keyword}"`
|
Name string `json:"name" elastic_mapping:"name:{type:keyword}"`
|
||||||
Phone string `json:"phone" elastic_mapping:"phone:{type:keyword}"`
|
Phone string `json:"phone" elastic_mapping:"phone:{type:keyword}"`
|
||||||
Email string `json:"email" elastic_mapping:"email:{type:keyword}"`
|
Email string `json:"email" elastic_mapping:"email:{type:keyword}"`
|
||||||
Roles []UserRole `json:"roles" elastic_mapping:"roles:{type:text}"`
|
Roles []UserRole `json:"roles"`
|
||||||
Tags []string `json:"tags" elastic_mapping:"tags:{type:text}"`
|
Tags []string `json:"tags,omitempty" elastic_mapping:"tags:{type:text}"`
|
||||||
}
|
}
|
||||||
type UserRole struct {
|
type UserRole struct {
|
||||||
Id string `json:"id" elastic_mapping:"id:{type:keyword}"`
|
Id string `json:"id" elastic_mapping:"id:{type:keyword}"`
|
||||||
|
|
|
@ -150,7 +150,7 @@ func (h Rbac) SearchUser(w http.ResponseWriter, r *http.Request, ps httprouter.P
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
h.WriteOKJSON(w, core.Response{Hit: res.Result, Total: res.Total})
|
h.WriteOKJSON(w, res)
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue