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
b1b93c4b
Commit
b1b93c4b
authored
Jun 21, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段到topic
parent
ee97b18f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
group.py
search/views/group.py
+17
-1
topic.py
trans2es/models/topic.py
+0
-0
topic_transfer.py
trans2es/utils/topic_transfer.py
+3
-0
No files found.
search/views/group.py
View file @
b1b93c4b
...
@@ -237,6 +237,7 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
...
@@ -237,6 +237,7 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
def
pictorial_topic_sort
(
pictorial_id
=-
1
,
offset
=
0
,
size
=
10
):
def
pictorial_topic_sort
(
pictorial_id
=-
1
,
offset
=
0
,
size
=
10
):
"""
"""
:remark 画报排序 人气 部分
:remark 画报排序 人气 部分
人气按照票数从大到小排序,相同票数按照图片票数更新时间由旧到新排序
:param user_id:
:param user_id:
:param sort_type:
:param sort_type:
:param offset:
:param offset:
...
@@ -251,9 +252,24 @@ def pictorial_topic_sort(pictorial_id=-1, offset=0, size=10):
...
@@ -251,9 +252,24 @@ def pictorial_topic_sort(pictorial_id=-1, offset=0, size=10):
"query"
:
{
"query"
:
{
"bool"
:
{
"bool"
:
{
"must"
:
[
"must"
:
[
{
"term"
:
{
"pictorial_id"
:
pictorial_id
}},
{
"term"
:
{
"is_online"
:
True
}},
{
"term"
:
{
"is_online"
:
True
}},
{
"term"
:
{
"is_deleted"
:
False
}},
{
"term"
:
{
"is_deleted"
:
False
}},
{
"nested"
:
{
"path"
:
"related_billboard"
,
"query"
:
{
"bool"
:
{
"must"
:
[
{
"term"
:
{
"pictorial_id"
:
pictorial_id
}
}
]
}
}
}
}
]
]
}
}
},
},
...
...
trans2es/models/topic.py
View file @
b1b93c4b
This diff is collapsed.
Click to expand it.
trans2es/utils/topic_transfer.py
View file @
b1b93c4b
...
@@ -138,6 +138,9 @@ class TopicTransfer(object):
...
@@ -138,6 +138,9 @@ class TopicTransfer(object):
res
[
"is_operation_home_recommend"
]
=
True
res
[
"is_operation_home_recommend"
]
=
True
logging
.
info
(
"test topic transfer time cost,time0:
%
d,time1:
%
d,time2:
%
d,time3:
%
d,time4:
%
d"
%
(
time0
,
time1
,
time2
,
time3
,
time4
))
logging
.
info
(
"test topic transfer time cost,time0:
%
d,time1:
%
d,time2:
%
d,time3:
%
d,time4:
%
d"
%
(
time0
,
time1
,
time2
,
time3
,
time4
))
#榜单关联的投票
res
[
"related_billboard"
]
=
instance
.
get_related_billboard
()
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