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
8d2d5945
Commit
8d2d5945
authored
Dec 01, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
aba02471
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
topic.py
search/utils/topic.py
+14
-0
group.py
search/views/group.py
+4
-1
topic.py
search/views/topic.py
+3
-0
No files found.
search/utils/topic.py
View file @
8d2d5945
...
...
@@ -284,3 +284,16 @@ class TopicUtils(object):
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
[]
@classmethod
def
get_topic_detail_info
(
cls
,
topic_id
):
try
:
q
=
dict
()
q
[
"query"
]
=
{
"term"
:{
""
}
}
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
dict
()
\ No newline at end of file
search/views/group.py
View file @
8d2d5945
...
...
@@ -22,7 +22,10 @@ def query_group(query="",offset=0,size=10):
"""
try
:
result_dict
=
GroupUtils
.
get_group_query_result
(
query
,
offset
,
size
)
group_ids_list
=
[
item
.
id
for
item
in
result_dict
[
"hits"
]]
group_ids_list
=
[]
if
len
(
result_dict
[
"hits"
])
>
0
:
group_ids_list
=
[
item
[
"_source"
][
"id"
]
for
item
in
result_dict
[
"hits"
]]
return
{
"group_ids"
:
group_ids_list
}
except
:
...
...
search/views/topic.py
View file @
8d2d5945
...
...
@@ -137,6 +137,9 @@ def topic_detail_page_recommend(user_id=-1,topic_id=-1,topic_group_id=-1,topic_u
"""
try
:
user_tag_list
=
list
()
result_dict
=
TopicUtils
.
get_topic_detail_recommend
(
user_id
,
user_tag_list
,
topic_group_id
,
topic_user_id
,
offset
,
size
)
return
{
"recommend_topic_ids"
:
[]}
...
...
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