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
8b4823e2
Commit
8b4823e2
authored
Feb 11, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'only_no_see' into 'master'
modify offset=0 See merge request
!105
parents
d0776bcf
811bfabe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
topic.py
search/utils/topic.py
+1
-1
topic.py
search/views/topic.py
+2
-2
No files found.
search/utils/topic.py
View file @
8b4823e2
...
...
@@ -203,7 +203,7 @@ class TopicUtils(object):
"boost_mode"
:
"sum"
,
"functions"
:
functions_list
}
if
query_type
==
TopicPageType
.
FIND_PAGE
and
len
(
filter_topic_id_list
)
>
0
:
if
len
(
filter_topic_id_list
)
>
0
:
query_function_score
[
"query"
][
"bool"
][
"must_not"
]
=
{
"terms"
:{
"id"
:
filter_topic_id_list
...
...
search/views/topic.py
View file @
8b4823e2
...
...
@@ -64,7 +64,7 @@ def get_home_recommend_topic_ids(user_id,device_id,offset,size,query=None,query_
if
redis_field_val_list
[
0
]:
have_read_topic_id_list
=
list
(
json
.
loads
(
redis_field_val_list
[
0
]))
topic_id_dict
=
TopicUtils
.
get_recommend_topic_ids
(
user_id
,
offset
,
size
*
size
,
query
,
query_type
=
TopicPageType
.
FIND_PAGE
,
filter_topic_id_list
=
have_read_topic_id_list
)
topic_id_dict
=
TopicUtils
.
get_recommend_topic_ids
(
user_id
,
offset
,
size
*
size
,
query
,
query_type
,
filter_topic_id_list
=
have_read_topic_id_list
)
have_read_group_id_set
=
set
()
have_read_user_id_set
=
set
()
unread_topic_id_dict
=
dict
()
...
...
@@ -221,7 +221,7 @@ def home_recommend(device_id="",user_id=-1,offset=0,size=10,query_type=TopicPage
if
not
isinstance
(
device_id
,
str
):
device_id
=
""
recommend_topic_ids
=
get_home_recommend_topic_ids
(
user_id
,
device_id
,
offset
,
size
,
query_type
=
query_type
)
recommend_topic_ids
=
get_home_recommend_topic_ids
(
user_id
,
device_id
,
offset
=
0
,
size
=
size
,
query_type
=
query_type
)
return
{
"recommend_topic_ids"
:
recommend_topic_ids
}
except
:
...
...
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