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
4654b320
Commit
4654b320
authored
Mar 14, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
49396b48
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
topic.py
search/utils/topic.py
+3
-3
topic.py
search/views/topic.py
+2
-2
No files found.
search/utils/topic.py
View file @
4654b320
...
...
@@ -297,9 +297,9 @@ class TopicUtils(object):
query_function_score
[
"query"
][
"bool"
][
"minimum_should_match"
]
=
1
q
[
"query"
][
"function_score"
]
=
query_function_score
q
[
"collapse"
]
=
{
"field"
:
"user_id"
}
#
q["collapse"] = {
#
"field": "user_id"
#
}
q
[
"_source"
]
=
{
"includes"
:[
"id"
,
"group_id"
,
"offline_score"
,
"user_id"
,
"edit_tag_list"
]
}
...
...
search/views/topic.py
View file @
4654b320
...
...
@@ -115,8 +115,8 @@ def get_home_recommend_topic_ids(user_id,device_id,offset,size,query=None,query_
else
:
break
if
len
(
have_read_topic_id_list
)
>
10
000
:
cut_len
=
len
(
have_read_topic_id_list
)
-
10
000
if
len
(
have_read_topic_id_list
)
>
5
000
:
cut_len
=
len
(
have_read_topic_id_list
)
-
5
000
have_read_topic_id_list
=
have_read_topic_id_list
[
cut_len
:]
redis_dict
=
{
"have_read_topic_list"
:
json
.
dumps
(
have_read_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