Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
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
rank
search_tips
Commits
7b8e6799
Commit
7b8e6799
authored
Sep 04, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
6d031f7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
auto_tips.py
search/utils/auto_tips.py
+2
-0
No files found.
search/utils/auto_tips.py
View file @
7b8e6799
...
@@ -123,6 +123,8 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
...
@@ -123,6 +123,8 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
logging
.
info
(
"get hit_item:
%
s"
%
hit_item
)
logging
.
info
(
"get hit_item:
%
s"
%
hit_item
)
if
hit_item
[
"_source"
][
"ori_name"
]
not
in
have_read_tips_set
:
if
hit_item
[
"_source"
][
"ori_name"
]
not
in
have_read_tips_set
:
have_read_tips_set
.
add
(
hit_item
[
"_source"
][
"ori_name"
])
have_read_tips_set
.
add
(
hit_item
[
"_source"
][
"ori_name"
])
if
"portrait"
not
in
hit_item
[
"_source"
]
.
keys
():
hit_item
[
"_source"
][
"portrait"
]
=
""
highlight_marks
=
u'<ems>
%
s</ems>'
%
query
highlight_marks
=
u'<ems>
%
s</ems>'
%
query
hit_item
[
"_source"
][
"highlight_name"
]
=
hit_item
[
"_source"
][
"ori_name"
]
.
replace
(
query
,
hit_item
[
"_source"
][
"highlight_name"
]
=
hit_item
[
"_source"
][
"ori_name"
]
.
replace
(
query
,
highlight_marks
)
highlight_marks
)
...
...
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