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
21b4e448
Commit
21b4e448
authored
Mar 22, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
090777bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
topic.py
search/views/topic.py
+1
-1
topic_high_star.json
trans2es/mapping/topic_high_star.json
+0
-0
type_info.py
trans2es/type_info.py
+4
-4
No files found.
search/views/topic.py
View file @
21b4e448
...
...
@@ -84,7 +84,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
single_size
=
size
,
query
=
query
,
query_type
=
query_type
,
filter_topic_id_list
=
have_read_topic_id_list
,
recommend_tag_list
=
recommend_tag_list
,
user_similar_score_list
=
user_similar_score_redis_list
,
index_type
=
"topic-high-star"
)
user_similar_score_list
=
user_similar_score_redis_list
)
have_read_group_id_set
=
set
()
have_read_user_id_set
=
set
()
unread_topic_id_dict
=
dict
()
...
...
trans2es/mapping/topic
-high-
star.json
→
trans2es/mapping/topic
_high_
star.json
View file @
21b4e448
File moved
trans2es/type_info.py
View file @
21b4e448
...
...
@@ -80,7 +80,7 @@ class TypeInfo(object):
def
bulk_get_data
(
self
,
instance_iterable
):
data_list
=
[]
#
3,
4,5星帖子单独索引
# 4,5星帖子单独索引
topic_data_high_star_list
=
list
()
if
self
.
batch_get_data_func
:
_pk_list
=
[
getattr
(
instance
,
'pk'
,
None
)
for
instance
in
instance_iterable
]
...
...
@@ -138,7 +138,7 @@ class TypeInfo(object):
))
else
:
data_list
.
append
(
data
)
if
self
.
type
==
"topic"
and
instance
.
content_level
and
int
(
instance
.
content_level
)
>=
3
:
if
self
.
type
==
"topic"
and
instance
.
content_level
and
int
(
instance
.
content_level
)
>=
4
:
topic_data_high_star_list
.
append
(
data
)
return
(
data_list
,
topic_data_high_star_list
)
...
...
@@ -269,8 +269,8 @@ def get_type_info_map():
type_info_list
=
[
TypeInfo
(
name
=
'topic
-high-star'
,
# 高
星日记
type
=
'topic
-high-
star'
,
name
=
'topic
_high_star'
,
# >=3
星日记
type
=
'topic
_high_
star'
,
model
=
topic
.
Topic
,
query_deferred
=
lambda
:
topic
.
Topic
.
objects
.
all
()
.
query
,
get_data_func
=
TopicTransfer
.
get_topic_data
,
...
...
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