Commit d785fcd5 authored by 段英荣's avatar 段英荣

Merge branch 'index' into 'master'

Index

See merge request !368
parents 9644f4d1 2956d9aa
......@@ -114,7 +114,7 @@ def search_user(query="", offset=0, size=10):
"bool": {
"must": [
{"term": {
"nick_name_pre": query
"nick_pre": query
}
}, {
"term": {
......
......@@ -14,7 +14,7 @@
"content_level":{"type":"text"},
"user_id":{"type":"long"},
"user_nick_name":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"},//帖子用户名
"user_nick_name_pre": {"type":"text","index":"not_analyzed"}, //不切词的用户名
"user_nick_name_pre": {"type":"text","analyzer":"keyword"}, //不切词的用户名
"group_id":{"type":"long"}, //所在组ID
"tag_list":{"type":"long"},//标签属性
"edit_tag_list":{"type":"long"},//编辑标签
......
......@@ -4,7 +4,8 @@
"id":{"type":"long"},
"user_id":{"type":"long"},
"nick_name":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"}, //昵称
"nick_name_pre":{"type":"text","index":"not_analyzed"}, //昵称
"nick_pre":{"type":"text","analyzer":"keyword"}, //昵称
"nick_name_pre":{"type":"text"}, //昵称
"profile_pic":{"type":"text"}, //头像
"gender":{"type":"integer"},
"is_online":{"type":"boolean"},//是否上线
......
......@@ -42,6 +42,7 @@ class UserTransfer(object):
res["user_id"] = instance.user_id
res["nick_name"] = instance.nick_name
res["nick_name_pre"] = instance.nick_name
res["nick_pre"] = instance.nick_name
res["profile_pic"] = instance.profile_pic
res["gender"] = instance.gender
res["city_id"] = instance.city_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment