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
64e24010
Commit
64e24010
authored
May 06, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add poctorial
parent
2c878e41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
pictorial.json
trans2es/mapping/pictorial.json
+3
-1
pictorial.py
trans2es/models/pictorial.py
+1
-0
pictorial_transfer.py
trans2es/utils/pictorial_transfer.py
+1
-0
No files found.
trans2es/mapping/pictorial.json
View file @
64e24010
...
...
@@ -17,6 +17,7 @@
"tag_name"
:{
"type"
:
"text"
,
"analyzer"
:
"gm_default_index"
,
"search_analyzer"
:
"gm_default_index"
},
"topic_id_list"
:{
"type"
:
"long"
},
"effective"
:{
"type"
:
"boolean"
},
"offline_score"
:{
"type"
:
"long"
}
"offline_score"
:{
"type"
:
"long"
},
"is_default"
:{
"type"
:
"long"
}
}
}
\ No newline at end of file
trans2es/models/pictorial.py
View file @
64e24010
...
...
@@ -59,6 +59,7 @@ class Pictorial(models.Model):
icon
=
models
.
CharField
(
verbose_name
=
u'画报名称'
,
max_length
=
255
)
topic_num
=
models
.
IntegerField
(
verbose_name
=
u'次数'
)
add_score
=
models
.
IntegerField
(
verbose_name
=
u'人工权重'
)
is_default
=
models
.
IntegerField
(
verbose_name
=
u"是否是默认画报"
)
def
get_topic_id
(
self
):
try
:
...
...
trans2es/utils/pictorial_transfer.py
View file @
64e24010
...
...
@@ -65,6 +65,7 @@ class PictorialTransfer(object):
res
[
"topic_id_list"
]
=
instance
.
get_topic_id
()
res
[
"effective"
]
=
instance
.
get_effective
(
res
[
"topic_id_list"
])
res
[
"offline_score"
]
=
cls
.
get_offline_score
(
instance
,
res
[
"topic_id_list"
])
res
[
"is_default"
]
=
instance
.
is_default
return
res
except
:
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