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
8fcec0ae
Commit
8fcec0ae
authored
Mar 23, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hot_search_word' into 'master'
灰度测试 See merge request
!70
parents
020adb71
0c6d8275
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
auto_tips.py
search/utils/auto_tips.py
+5
-6
auto_tips.py
search/view/auto_tips.py
+1
-1
No files found.
search/utils/auto_tips.py
View file @
8fcec0ae
...
...
@@ -31,14 +31,13 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50, device_id=None):
"""
try
:
###在原来的逻辑上加两层灰度
gray_number
=
1
if
gray_number
==
1
:
sub_index_name
=
"suggest"
size
=
50
else
:
###在原来的逻辑上加两层灰度
if
device_id
in
[
"68335D20-760F-41C1-9A00-8F9B4C0D62DB"
]:
sub_index_name
=
"suggest-v1"
size
=
30
else
:
sub_index_name
=
"suggest"
have_read_tips_set
,
ret_list
,
result_dict
=
get_query_by_es
(
query
=
str
(
query
)
.
lower
(),
lat
=
lat
,
lng
=
lng
,
offset
=
offset
,
...
...
search/view/auto_tips.py
View file @
8fcec0ae
...
...
@@ -13,7 +13,7 @@ from search.utils.auto_tips import get_suggest_tips
@bind
(
"search_tips/search/auto_complete_query"
)
def
auto_complete_query
(
q
,
lat
,
lng
,
device_id
=
None
):
def
auto_complete_query
(
q
=
""
,
lat
=
0
,
lng
=
0
,
device_id
=
None
):
try
:
"""auto complate words/tags/doctors etc.
...
...
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