Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
physical
Commits
d785fcd5
Commit
d785fcd5
authored
Jun 13, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'index' into 'master'
Index See merge request
!368
parents
9644f4d1
2956d9aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
+5
-3
user.py
search/views/user.py
+1
-1
topic-star.json
trans2es/mapping/topic-star.json
+1
-1
user.json
trans2es/mapping/user.json
+2
-1
user_transfer.py
trans2es/utils/user_transfer.py
+1
-0
No files found.
search/views/user.py
View file @
d785fcd5
...
@@ -114,7 +114,7 @@ def search_user(query="", offset=0, size=10):
...
@@ -114,7 +114,7 @@ def search_user(query="", offset=0, size=10):
"bool"
:
{
"bool"
:
{
"must"
:
[
"must"
:
[
{
"term"
:
{
{
"term"
:
{
"nick_
name_
pre"
:
query
"nick_pre"
:
query
}
}
},
{
},
{
"term"
:
{
"term"
:
{
...
...
trans2es/mapping/topic-star.json
View file @
d785fcd5
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
"content_level"
:{
"type"
:
"text"
},
"content_level"
:{
"type"
:
"text"
},
"user_id"
:{
"type"
:
"long"
},
"user_id"
:{
"type"
:
"long"
},
"user_nick_name"
:{
"type"
:
"text"
,
"analyzer"
:
"gm_default_index"
,
"search_analyzer"
:
"gm_default_index"
},
//帖子用户名
"user_nick_name"
:{
"type"
:
"text"
,
"analyzer"
:
"gm_default_index"
,
"search_analyzer"
:
"gm_default_index"
},
//帖子用户名
"user_nick_name_pre"
:
{
"type"
:
"text"
,
"
index"
:
"not_analyze
d"
},
//不切词的用户名
"user_nick_name_pre"
:
{
"type"
:
"text"
,
"
analyzer"
:
"keywor
d"
},
//不切词的用户名
"group_id"
:{
"type"
:
"long"
},
//所在组ID
"group_id"
:{
"type"
:
"long"
},
//所在组ID
"tag_list"
:{
"type"
:
"long"
},
//标签属性
"tag_list"
:{
"type"
:
"long"
},
//标签属性
"edit_tag_list"
:{
"type"
:
"long"
},
//编辑标签
"edit_tag_list"
:{
"type"
:
"long"
},
//编辑标签
...
...
trans2es/mapping/user.json
View file @
d785fcd5
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
"id"
:{
"type"
:
"long"
},
"id"
:{
"type"
:
"long"
},
"user_id"
:{
"type"
:
"long"
},
"user_id"
:{
"type"
:
"long"
},
"nick_name"
:{
"type"
:
"text"
,
"analyzer"
:
"gm_default_index"
,
"search_analyzer"
:
"gm_default_index"
},
//昵称
"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"
},
//头像
"profile_pic"
:{
"type"
:
"text"
},
//头像
"gender"
:{
"type"
:
"integer"
},
"gender"
:{
"type"
:
"integer"
},
"is_online"
:{
"type"
:
"boolean"
},
//是否上线
"is_online"
:{
"type"
:
"boolean"
},
//是否上线
...
...
trans2es/utils/user_transfer.py
View file @
d785fcd5
...
@@ -42,6 +42,7 @@ class UserTransfer(object):
...
@@ -42,6 +42,7 @@ class UserTransfer(object):
res
[
"user_id"
]
=
instance
.
user_id
res
[
"user_id"
]
=
instance
.
user_id
res
[
"nick_name"
]
=
instance
.
nick_name
res
[
"nick_name"
]
=
instance
.
nick_name
res
[
"nick_name_pre"
]
=
instance
.
nick_name
res
[
"nick_name_pre"
]
=
instance
.
nick_name
res
[
"nick_pre"
]
=
instance
.
nick_name
res
[
"profile_pic"
]
=
instance
.
profile_pic
res
[
"profile_pic"
]
=
instance
.
profile_pic
res
[
"gender"
]
=
instance
.
gender
res
[
"gender"
]
=
instance
.
gender
res
[
"city_id"
]
=
instance
.
city_id
res
[
"city_id"
]
=
instance
.
city_id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment