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
钟尚武
physical
Commits
7be5b60e
Commit
7be5b60e
authored
Feb 26, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
150a39ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
tag.json
trans2es/mapping/tag.json
+3
-0
tag.py
trans2es/models/tag.py
+3
-0
tag_transfer.py
trans2es/utils/tag_transfer.py
+3
-1
No files found.
trans2es/mapping/tag.json
View file @
7be5b60e
...
@@ -19,6 +19,9 @@
...
@@ -19,6 +19,9 @@
},
},
"name"
:{
"type"
:
"text"
,
"analyzer"
:
"gm_default_index"
,
"search_analyzer"
:
"gm_default_index"
},
"name"
:{
"type"
:
"text"
,
"analyzer"
:
"gm_default_index"
,
"search_analyzer"
:
"gm_default_index"
},
"tag_type"
:{
"type"
:
"long"
},
"tag_type"
:{
"type"
:
"long"
},
"collection"
:{
"type"
:
"long"
},
"is_ai"
:{
"type"
:
"long"
},
"is_own"
:{
"type"
:
"long"
},
"is_online"
:{
"type"
:
"keyword"
},
//上线
"is_online"
:{
"type"
:
"keyword"
},
//上线
"is_deleted"
:{
"type"
:
"keyword"
},
"is_deleted"
:{
"type"
:
"keyword"
},
"near_new_topic_num"
:{
"type"
:
"long"
,
"store"
:
true
}
"near_new_topic_num"
:{
"type"
:
"long"
,
"store"
:
true
}
...
...
trans2es/models/tag.py
View file @
7be5b60e
...
@@ -45,6 +45,9 @@ class Tag(models.Model):
...
@@ -45,6 +45,9 @@ class Tag(models.Model):
name
=
models
.
CharField
(
verbose_name
=
u"标签名称"
,
max_length
=
128
)
name
=
models
.
CharField
(
verbose_name
=
u"标签名称"
,
max_length
=
128
)
description
=
models
.
TextField
(
verbose_name
=
u"标签描述"
)
description
=
models
.
TextField
(
verbose_name
=
u"标签描述"
)
icon_url
=
models
.
CharField
(
verbose_name
=
u"icon_url"
,
max_length
=
120
)
icon_url
=
models
.
CharField
(
verbose_name
=
u"icon_url"
,
max_length
=
120
)
collection
=
models
.
IntegerField
(
verbose_name
=
u"是否编辑"
)
is_ai
=
models
.
IntegerField
(
verbose_name
=
u"是否ai"
)
is_own
=
models
.
IntegerField
(
verbose_name
=
u"是否ins上自带"
)
create_time
=
models
.
DateTimeField
(
verbose_name
=
u'创建时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
create_time
=
models
.
DateTimeField
(
verbose_name
=
u'创建时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
update_time
=
models
.
DateTimeField
(
verbose_name
=
u'更新时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
update_time
=
models
.
DateTimeField
(
verbose_name
=
u'更新时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
...
...
trans2es/utils/tag_transfer.py
View file @
7be5b60e
...
@@ -57,7 +57,9 @@ class TagTransfer(object):
...
@@ -57,7 +57,9 @@ class TagTransfer(object):
tag_type_list
.
append
(
tag_type_id
)
tag_type_list
.
append
(
tag_type_id
)
res
[
"tag_type"
]
=
tag_type_list
res
[
"tag_type"
]
=
tag_type_list
res
[
"collection"
]
=
instance
.
collection
res
[
"is_ai"
]
=
instance
.
is_ai
res
[
"is_own"
]
=
instance
.
is_own
return
res
return
res
except
:
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
...
...
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