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
50890ac3
Commit
50890ac3
authored
Mar 22, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
22ffe30b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
group.py
search/views/group.py
+16
-2
No files found.
search/views/group.py
View file @
50890ac3
...
...
@@ -135,15 +135,26 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
for
item
in
result_dict
[
"hits"
]:
pictorial_id
=
item
[
"_source"
][
"id"
]
pictorial_id_list
.
append
(
pictorial_id
)
logging
.
info
(
"get
result_dic
t:
%
s"
%
pictorial_id_list
)
logging
.
info
(
"get
result_dict:
%
s"
%
pictorial_id
_list
)
logging
.
info
(
"get
pictorial_id_lis
t:
%
s"
%
pictorial_id_list
)
logging
.
info
(
"get
topic_tag_list:
%
s"
%
topic_tag
_list
)
if
len
(
pict_pictorial_ids_list
)
<
10
:
q
[
"query"
]
=
{
"bool"
:{
"must"
:{
"term"
:
{
"is_online"
:
True
},
"term"
:
{
"is_delete"
:
False
},
"terms"
:
{
"tag_id"
:
topic_tag_list
}
}
}
}
q
[
"_source"
]
=
{
"include"
:
[
"id"
,
"tag_id"
]
}
...
...
@@ -157,6 +168,9 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
if
len
(
result_dict
[
"hits"
])
>
0
:
pictorial_id_list
.
append
(
item
[
"_source"
][
"id"
]
for
item
in
result_dict
[
"hits"
])
#
logging
.
info
(
"get result_dict tag:
%
s"
%
result_dict
)
return
{
"pictorial_ids_list"
:
pictorial_id_list
}
else
:
...
...
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