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
bb1d0841
Commit
bb1d0841
authored
Dec 31, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日志
parent
b3d4d147
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
auto_tips.py
search/utils/auto_tips.py
+7
-3
No files found.
search/utils/auto_tips.py
View file @
bb1d0841
...
...
@@ -243,13 +243,17 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
def
set_highlihgt
(
query
=
None
,
ori_name
=
None
):
###高亮调整
all_word
=
set
()
query2
=
ori_name
for
item
in
range
(
0
,
len
(
query
)):
is_find
=
query2
.
find
(
query
[
item
])
all_word
.
add
(
query
[
item
])
for
item
in
all_word
:
is_find
=
query2
.
find
(
item
)
high_query
=
None
if
is_find
>=
0
:
highlight_marks
=
u'<ems>
%
s</ems>'
%
query
[
item
]
high_query
=
query2
.
replace
(
query
[
item
]
,
highlight_marks
)
highlight_marks
=
u'<ems>
%
s</ems>'
%
item
high_query
=
query2
.
replace
(
item
,
highlight_marks
)
query2
=
high_query
if
high_query
==
None
:
highlight_name
=
query2
...
...
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