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
11234898
Commit
11234898
authored
Jun 12, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
09c3309d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
auto_tips.py
search/utils/auto_tips.py
+1
-1
wordresemble.py
trans2es/utils/wordresemble.py
+1
-1
No files found.
search/utils/auto_tips.py
View file @
11234898
...
...
@@ -87,7 +87,7 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
return
ret_list
else
:
QUERY_KEY
=
"query:{}:search_tip
s
"
QUERY_KEY
=
"query:{}:search_tip"
query_base64
=
base64
.
b64encode
(
query
.
encode
(
'utf8'
))
.
decode
(
'utf8'
)
key
=
QUERY_KEY
.
format
(
query_base64
)
labels
=
list
(
map
(
lambda
x
:
x
.
decode
(
"utf8"
),
list
(
redis_client
.
smembers
(
key
))))
...
...
trans2es/utils/wordresemble.py
View file @
11234898
...
...
@@ -146,7 +146,7 @@ class WordResemble(object):
def
set_data_to_redis
(
cls
,
instance
):
try
:
QUERY_KEY
=
"query:{}:search_tip
s
"
QUERY_KEY
=
"query:{}:search_tip"
tips_num_redis_key_prefix
=
"search_tips:tips_mapping_num"
# result = wordresemble.WordRel.objects.all().values("keyword", "id")
...
...
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