Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
5d5b4817
Commit
5d5b4817
authored
Mar 17, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sql
parent
3899ebbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
new_tag3_cold_start.py
eda/smart_rank/new_tag3_cold_start.py
+7
-3
No files found.
eda/smart_rank/new_tag3_cold_start.py
View file @
5d5b4817
...
...
@@ -125,10 +125,14 @@ def get_es_diary(keywords, city_tag_id=-1, version=False):
q
[
"sort"
]
=
sort_list
q
[
"_source"
]
=
{
"includes"
:
[
"id"
,
"second_demands"
]}
es_res
=
es_query
(
"diary"
,
q
,
offset
=
0
,
size
=
500
)
diary_
id
s
=
[]
diary_
pair
s
=
[]
for
diary_info
in
es_res
[
"hits"
][
"hits"
]:
diary_ids
.
append
(
diary_info
[
"_source"
][
"id"
])
return
diary_ids
sd
=
""
second_demands
=
diary_info
[
"_source"
]
.
get
(
"second_demands"
,
[])
if
second_demands
and
len
(
second_demands
)
>
0
:
sd
=
second_demands
[
0
]
diary_pairs
.
append
((
diary_info
[
"_source"
][
"id"
],
sd
))
return
diary_pairs
if
__name__
==
"__main__"
:
...
...
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