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
bdee62af
Commit
bdee62af
authored
Mar 15, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'similar_sort' into 'master'
modify See merge request
!178
parents
fe3f0cc3
cdff4c1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
topic.py
search/views/topic.py
+2
-2
No files found.
search/views/topic.py
View file @
bdee62af
...
@@ -25,7 +25,7 @@ def get_discover_page_topic_ids(user_id, device_id, size, query_type=TopicPageTy
...
@@ -25,7 +25,7 @@ def get_discover_page_topic_ids(user_id, device_id, size, query_type=TopicPageTy
have_read_topic_id_list
=
json
.
loads
(
redis_field_val_list
[
0
])
if
redis_field_val_list
[
0
]
else
[]
have_read_topic_id_list
=
json
.
loads
(
redis_field_val_list
[
0
])
if
redis_field_val_list
[
0
]
else
[]
recommend_topic_ids
=
TopicUtils
.
get_recommend_topic_ids
(
user_id
=
user_id
,
tag_id
=
0
,
offset
=
0
,
size
=
size
,
recommend_topic_ids
=
TopicUtils
.
get_recommend_topic_ids
(
user_id
=
user_id
,
tag_id
=
0
,
offset
=
0
,
size
=
size
,
single_size
=
size
,
query_type
=
query_type
,
query_type
=
query_type
,
filter_topic_id_list
=
have_read_topic_id_list
)
filter_topic_id_list
=
have_read_topic_id_list
)
...
@@ -320,7 +320,7 @@ def query_topic_by_user_similarity(topic_similarity_score_dict, offset=0, size=1
...
@@ -320,7 +320,7 @@ def query_topic_by_user_similarity(topic_similarity_score_dict, offset=0, size=1
"""
"""
try
:
try
:
must_topic_id_list
=
list
(
topic_similarity_score_dict
.
keys
())
must_topic_id_list
=
list
(
topic_similarity_score_dict
.
keys
())
topic_id_list
=
TopicUtils
.
get_recommend_topic_ids
(
tag_id
=
0
,
user_id
=-
1
,
offset
=
offset
,
size
=
size
,
topic_id_list
=
TopicUtils
.
get_recommend_topic_ids
(
tag_id
=
0
,
user_id
=-
1
,
offset
=
offset
,
size
=
size
,
single_size
=
size
,
must_topic_id_list
=
must_topic_id_list
)
must_topic_id_list
=
must_topic_id_list
)
return
{
"recommend_topic_ids"
:
topic_id_list
}
return
{
"recommend_topic_ids"
:
topic_id_list
}
...
...
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