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
d7c891a2
Commit
d7c891a2
authored
Aug 27, 2019
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wordres' into 'master'
add See merge request
!31
parents
ce9c7af5
be51b923
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
auto_tips.py
search/utils/auto_tips.py
+2
-1
No files found.
search/utils/auto_tips.py
View file @
d7c891a2
...
...
@@ -174,7 +174,8 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
QUERY_KEY
=
"query:search_tip"
query_base64
=
base64
.
b64encode
(
query
.
encode
(
'utf8'
))
.
decode
(
'utf8'
)
if
redis_client
.
hget
(
QUERY_KEY
,
query_base64
)
is
not
None
:
value_data
=
json
.
loads
(
redis_client
.
hget
(
QUERY_KEY
,
query_base64
))
logging
.
info
(
"get type:
%
s"
%
type
(
str
(
redis_client
.
hget
(
QUERY_KEY
,
query_base64
))))
value_data
=
json
.
loads
(
str
(
redis_client
.
hget
(
QUERY_KEY
,
query_base64
)))
logging
.
info
(
"get value_data:
%
s"
%
value_data
)
if
len
(
value_data
)
>
0
:
...
...
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