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
365ee846
Commit
365ee846
authored
Jun 06, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
best_answer
parent
a85e876d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
auto_tips.py
search/utils/auto_tips.py
+1
-0
suggest.json
trans2es/mapping/suggest.json
+2
-0
No files found.
search/utils/auto_tips.py
View file @
365ee846
...
@@ -41,6 +41,7 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
...
@@ -41,6 +41,7 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
}
}
}
}
logging
.
info
(
"get qqqqqqqq:
%
s"
%
q
)
have_read_tips_set
=
set
()
have_read_tips_set
=
set
()
ret_list
=
list
()
ret_list
=
list
()
result_dict
=
ESPerform
.
get_search_results
(
ESPerform
.
get_cli
(),
sub_index_name
=
"suggest"
,
query_body
=
q
,
result_dict
=
ESPerform
.
get_search_results
(
ESPerform
.
get_cli
(),
sub_index_name
=
"suggest"
,
query_body
=
q
,
...
...
trans2es/mapping/suggest.json
View file @
365ee846
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
"properties"
:
{
"properties"
:
{
"id"
:{
"type"
:
"text"
},
"id"
:{
"type"
:
"text"
},
"suggest"
:{
"suggest"
:{
"analyzer"
:
"keyword"
,
"search_analyzer"
:
"keyword"
,
"type"
:
"completion"
,
"type"
:
"completion"
,
"contexts"
:[
"contexts"
:[
{
{
...
...
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