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
f8c171cd
Commit
f8c171cd
authored
Sep 10, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'buc' into 'master'
add See merge request
!100
parents
7cc2313d
fb407d15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
18 deletions
+9
-18
auto_tips.py
search/utils/auto_tips.py
+1
-14
commons.py
trans2es/commons/commons.py
+8
-4
No files found.
search/utils/auto_tips.py
View file @
f8c171cd
...
...
@@ -16,26 +16,13 @@ from pypinyin import pinyin, lazy_pinyin
def
get_suggest_tips
(
query
,
lat
,
lng
,
offset
=
0
,
size
=
50
,
device_id
=
None
):
"""
这个地方目前是有三个逻辑 分两个灰度验证
50
%
前段强加权后根据tab转化率和词频进行排序 索引 suggest gray_number=1 尾号["0", "1", "2", "3", "c", "d", "e", "f"]
25
%
去掉前段强加权后 直接根据tag转化率和词频进行排序 suggest-v1 gray_number=2 尾号["4", "5", "6", "a"]
25
%
去掉前段强加权后 根据tag转化率和词频进行排序 再根据前段加权展示排序 suggest-v1 gray_number=3 尾号["9", "8", "7", "b"]
:param query:
:param lat:
:param lng:
:param offset:
:param size:
:param device_id:
:return:
"""
""" """
try
:
gray_number
=
1
###在原来的逻辑上加两层灰度
if
device_id
in
[
"057F28DF-20B8-488F-A285-931367FCC110"
]:
sub_index_name
=
"suggest-v1"
else
:
sub_index_name
=
"suggest"
...
...
trans2es/commons/commons.py
View file @
f8c171cd
...
...
@@ -118,10 +118,14 @@ def get_tips_suggest_list(instance_cn_name):
def
get_tips_suggest_list_v1
(
instance_cn_name
):
try
:
# ch_full_weight = 6.0 * 1000
# py_full_weight = 3.0 * 1000
full_weight
=
1
py_acronym_full_weight
=
1
ch_full_weight
=
6.0
*
1000
py_full_weight
=
3.0
*
1000
if
instance_cn_name
in
[
"AI测颜值"
,
"AI测肤质"
,
"ai测颜值"
,
"ai测肤质"
]:
full_weight
=
10000000
py_acronym_full_weight
=
1
else
:
full_weight
=
1
py_acronym_full_weight
=
1
py_acronym_prefix_weight
=
1
ch_prefix_weight
=
1
...
...
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