|
@@ -44,10 +44,23 @@ class SearchABTest(object):
|
|
|
"""
|
|
|
兜底策略
|
|
|
"""
|
|
|
- return await SearchMethod().search_v0(
|
|
|
+ result = await SearchMethod().search_v0(
|
|
|
text=cls.article_keys[0],
|
|
|
trace_id=cls.trace_id
|
|
|
)
|
|
|
+ if result:
|
|
|
+ return result
|
|
|
+ else:
|
|
|
+ sub_result = await SearchMethod().search_v0(
|
|
|
+ text=cls.article_keys[1],
|
|
|
+ trace_id=cls.trace_id)
|
|
|
+ if sub_result:
|
|
|
+ return sub_result
|
|
|
+ else:
|
|
|
+ return await SearchMethod().search_v0(
|
|
|
+ text=cls.article_keys[2],
|
|
|
+ trace_id=cls.trace_id
|
|
|
+ )
|
|
|
|
|
|
@classmethod
|
|
|
async def ab_0(cls):
|
|
@@ -77,7 +90,7 @@ class SearchABTest(object):
|
|
|
if search_result:
|
|
|
return search_result
|
|
|
else:
|
|
|
- return await cls.base_line()
|
|
|
+ return await cls.ab_0()
|
|
|
|
|
|
@classmethod
|
|
|
async def ab_2(cls):
|