Commit 219c81c2 authored by lixiaofang's avatar lixiaofang

修改url

parent 16af23a3
This diff is collapsed.
......@@ -4,7 +4,7 @@ from libs.rpc import get_rpc_invoker
from hera.models.city_rank import CityWhiteList
@bind('doris/hera/in_city_whitelist')
@bind('dymas/hera/in_city_whitelist')
def city_is_in_whitelist(city_ids):
rs = []
if not city_ids:
......
......@@ -12,12 +12,12 @@ class RankTestCase(DorisTestCase):
params = {
"strategy_name":STRATEGY_TYPE.SERVICE_SEARCH
}
resp = self.call("doris/strategy/get",params)
resp = self.call("dymas/strategy/get",params)
self.assertDictEqual(resp.result,{'a': 12, 'b': 3, 'c': 1, 'd': 5, 'e': 3})
def test_get_wrong_strategy(self):
params = {
"strategy_name":'test'
}
resp = self.call("doris/strategy/get",params)
resp = self.call("dymas/strategy/get",params)
self.assertEqual(resp.code, ERROR.UNSUPPORT_STRATEGY_TYPE)
......@@ -8,7 +8,7 @@ from rank.models import Interpose
logger = logging.getLogger(__name__)
@bind('doris/interpose/get')
@bind('dymas/interpose/get')
def get_interpose_strategy(interpose_type, city_tag_id, tag_id, sort_order, keyword=None):
tag_ids = [0]
city_tag_ids = [0]
......
......@@ -7,7 +7,7 @@ from libs.types import ensure_str
from recommend.models import ServiceHot
from libs.cache import redis_client as service_hot_redis_client
@bind('doris/stat/doctor')
@bind('dymas/stat/doctor')
def doris_stat_doctor(doctor_id):
redis_key = "doctor:{}".format(doctor_id)
stat_json = redis_client.get(redis_key)
......@@ -23,7 +23,7 @@ def doris_stat_doctor(doctor_id):
# @rd 郑伟
# @param service_id 美购id
# @date 20170620
@bind("doris/stat/service")
@bind("dymas/stat/service")
def doris_stat_service(service_id):
redis_key = ServiceHot.get_stat_key(service_id)
stat_json = service_hot_redis_client.get(redis_key)
......
......@@ -12,7 +12,7 @@ ALLOW_STRATEGY = [
]
@bind('doris/strategy/get')
@bind('dymas/strategy/get')
def get_doris_strategy(strategy_name=None):
if strategy_name is None:
return {}
......
......@@ -10,7 +10,7 @@ class RecommandTestCase(DorisTestCase):
params = {
"device_id": "aaa"
}
resp = self.call("doris/recommend/service", params)
resp = self.call("dymas/recommend/service", params)
self.assertEqual(resp.code, 0)
def test_get_hot_service_by_tags(self):
......@@ -20,13 +20,13 @@ class RecommandTestCase(DorisTestCase):
params = {
"device_id": "aaa"
}
resp = self.call("doris/recommend/interest_tag", params)
resp = self.call("dymas/recommend/interest_tag", params)
def test_tobuy_service(self):
params = {
"device_id": "56D5E838-470E-42BB-87E1-FA07C47FC390"
}
resp = self.call("doris/willbuy/service", params)
resp = self.call("dymas/willbuy/service", params)
self.assertEqual(resp.code, 0)
......
......@@ -54,7 +54,7 @@ MAX_LOAD = 200
logger = logging.getLogger(__name__)
@bind("doris/recommend/get_diaries")
@bind("dymas/recommend/get_diaries")
def get_diaries(tags, city, offset=0, size=10, city_tag_id=None):
# NOTE: city as city id
sort_params = {}
......@@ -94,7 +94,7 @@ def get_diaries(tags, city, offset=0, size=10, city_tag_id=None):
return {"diaries_ids": diaries_ids}
@bind("doris/recommend/get_articles")
@bind("dymas/recommend/get_articles")
def get_articles(tags, offset=0, size=10):
filters = {
"content_level": [CONTENT_CLASS.EXCELLENT, CONTENT_CLASS.FINE]
......@@ -107,7 +107,7 @@ def get_articles(tags, offset=0, size=10):
return {"article_ids": article_ids}
@bind("doris/recommend/get_answers")
@bind("dymas/recommend/get_answers")
def get_answers(tags, offset=0, size=10):
filters = {
"content_level": [CONTENT_CLASS.EXCELLENT, CONTENT_CLASS.FINE]
......@@ -129,7 +129,7 @@ def get_answers(tags, offset=0, size=10):
answer_ids = [answer['id'] for answer in answers]
return {"answer_ids": answer_ids}
@bind('doris/recommend/icon')
@bind('v/recommend/icon')
def fetch_icon(device_id, size):
try:
card_type = "icon"
......@@ -151,7 +151,7 @@ def fetch_icon(device_id, size):
logging_exception()
return {"icon": []}
@bind('doris/recommend/homepage_polymer')
@bind('dymas/recommend/homepage_polymer')
def fetch_polymer_ids(device_id, size):
try:
card_type = "polymer_ids"
......@@ -173,7 +173,7 @@ def fetch_polymer_ids(device_id, size):
logging_exception()
return {"polymer_ids": []}
@bind('doris/recommend/feed')
@bind('dymas/recommend/feed')
def recommend_feed(device_id, card_type, city_id, size):
try:
return RecommendFeed.dispatch(device_id, card_type,
......
......@@ -25,7 +25,7 @@ MAX_LOAD = 200
logger = logging.getLogger(__name__)
@bind("doris/recommend/content_detail_tag")
@bind("dymas/recommend/content_detail_tag")
def content_detail_tag(tag={}, page=1, city_id=None, city_tag_id=-1,
device_id=None, card_type="diary", card_id=-1):
"""
......
......@@ -38,7 +38,7 @@ def get_gm_kv_ins(redis_ip, redis_port, redis_db,redis_password=""):
return None
@bind("doris/recommend/user_portrait")
@bind("dymas/recommend/user_portrait")
def get_user_portrait(device_id):
try:
gm_kv_ins = None
......
......@@ -55,7 +55,7 @@ def get_willbuy_tags(device_id):
# @param current_city_tag_id 用户美购首页选择城市tag_id
# @param size 一次推荐多少条美购
# @date 20170616
@bind('doris/recommend/service')
@bind('dymas/recommend/service')
def recommend_service(device_id, current_city_tag_id=None, sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, offset=0,
size=10):
"""
......@@ -96,13 +96,13 @@ def recommend_service(device_id, current_city_tag_id=None, sort_type=SERVICE_ORD
return {"service_ids": service_ids}
@bind("doris/recommend/interest_tag")
@bind("dymas/recommend/interest_tag")
def get_recommend_interest_tag(device_id):
interest_tags = get_device_interest(device_id)
return {"interest_tags": interest_tags}
@bind("doris/willbuy/service")
@bind("dymas/willbuy/service")
def tobuy_service(device_id, current_city_tag_id=None, offset=0, size=40):
tobuy_tags = get_willbuy_tags(device_id)
service_ids = get_hot_service_by_tags(tobuy_tags, area_tag_id=current_city_tag_id, offset=offset, size=size)
......@@ -397,7 +397,7 @@ def supplement_service_ids(user_city_tag_id, in_whitelist, had_read_service_list
return []
@bind('doris/recommend/order/service')
@bind('dymas/recommend/order/service')
def get_recommend_order_service(service_ids, query_params):
# params
try:
......@@ -468,7 +468,7 @@ def get_recommend_order_service(service_ids, query_params):
return {"service_ids": res_service_ids}
@bind('doris/recommend/shopcart/service')
@bind('dymas/recommend/shopcart/service')
def get_recommend_shopcart_service(service_ids, query_params):
try:
# params
......@@ -543,7 +543,7 @@ def get_recommend_shopcart_service(service_ids, query_params):
return {"service_ids": res_service_ids}
@bind('doris/recommend/point/service')
@bind('dymas/recommend/point/service')
def get_recommend_point_service(service_ids, query_params):
try:
user_id = query_params['user_id']
......@@ -620,7 +620,7 @@ def get_recommend_point_service(service_ids, query_params):
# 小程序签到页面美购展示接口
@bind('doris/recommend/views/wechat_check_in')
@bind('dymas/recommend/views/wechat_check_in')
def wechat_check_in(query_params):
try:
user_city_tag_id = query_params['user_city_tag_id']
......@@ -643,7 +643,7 @@ def wechat_check_in(query_params):
# 美购app签到接口
@bind('doris/recommend/views/check_in')
@bind('dymas/recommend/views/check_in')
def check_in_service_ids(query_params):
try:
# params
......
......@@ -11,7 +11,7 @@ class SearchTestCase(DorisTestCase):
params = {
"doctor_id":'bjgmhyy'
}
resp = self.call("doris/search/guess_you_like_service",params)
resp = self.call("dymas/search/guess_you_like_service",params)
......@@ -19,13 +19,13 @@ class SearchTestCase(DorisTestCase):
params = {
"tag_id":1682,
}
resp = self.call("doris/search/guess_you_like_service",params)
resp = self.call("dymas/search/guess_you_like_service",params)
self.assertEqual(resp.code, 0)
def test_guess_you_like_service(self):
params = {
}
resp = self.call("doris/search/guess_you_like_service",params)
resp = self.call("dymas/search/guess_you_like_service",params)
self.assertEqual(resp.code, 0)
......@@ -33,7 +33,7 @@ class SearchTestCase(DorisTestCase):
"doctor_id":'bjgmhyy',
"tag_id":1682,
}
resp = self.call("doris/search/guess_you_like_service",params)
resp = self.call("dymas/search/guess_you_like_service",params)
self.assertEqual(resp.code, 0)
......@@ -41,18 +41,18 @@ class SearchTestCase(DorisTestCase):
params = {
"special_id":309,
}
resp = self.call("doris/search/get_diaries_by_special_id",params)
resp = self.call("dymas/search/get_diaries_by_special_id",params)
self.assertEqual(resp.code, 0)
def test_get_index_diaries(self):
resp = self.call("doris/search/get_index_diaries")
resp = self.call("dymas/search/get_index_diaries")
self.assertEqual(resp.code, 0)
def test_get_doctors_by_special_id(self):
params = {
"special_id":491,
}
resp = self.call("doris/search/get_doctors_by_special_id", params)
resp = self.call("dymas/search/get_doctors_by_special_id", params)
self.assertEqual(resp.code, 0)
def test_get_questions_by_tag_id(self):
......@@ -60,7 +60,7 @@ class SearchTestCase(DorisTestCase):
"tag_id":87,
"sort_type": QUESTION_ORDER_TYPE.HOT
}
resp = self.call("doris/filter/question", params)
resp = self.call("dymas/filter/question", params)
self.assertEqual(resp.code, 0)
def test_get_questions_by_tag_id(self):
......@@ -68,7 +68,7 @@ class SearchTestCase(DorisTestCase):
"tag_id":87,
"sort_type": QUESTION_ORDER_TYPE.UPDATE
}
resp = self.call("doris/filter/question", params)
resp = self.call("dymas/filter/question", params)
self.assertEqual(resp.code, 0)
def test_query_sku_with_cashback(self):
......@@ -78,14 +78,14 @@ class SearchTestCase(DorisTestCase):
"share_get_cashback":True
}
}
resp = self.call("doris/search/query_sku", params)
resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code,0)
def test_query_sku(self):
params = {
"query" : u'北京'
}
resp = self.call("doris/search/query_sku",params)
resp = self.call("dymas/search/query_sku",params)
self.assertEqual(resp.code,0)
def test_query_sku_lowest_price(self):
......@@ -93,7 +93,7 @@ class SearchTestCase(DorisTestCase):
"query" : u'北京',
"sort_type": SERVICE_ORDER_TYPE.ORDER_LOWEST_PRICE
}
resp = self.call("doris/search/query_sku",params)
resp = self.call("dymas/search/query_sku",params)
self.assertEqual(resp.code,0)
......@@ -102,7 +102,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.ORDER_HIGHEST_SALES
}
resp = self.call("doris/search/query_sku", params)
resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0)
def test_query_sku_case_count(self):
......@@ -110,7 +110,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.CASE_COUNT
}
resp = self.call("doris/search/query_sku", params)
resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0)
def test_query_sku_order_evaluate(self):
......@@ -118,7 +118,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.ORDER_EVALUATE
}
resp = self.call("doris/search/query_sku", params)
resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0)
def test_query_sku_popularity(self):
......@@ -126,7 +126,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.POPULARITY
}
resp = self.call("doris/search/query_sku", params)
resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0)
def test_query_sku_distance(self):
......@@ -134,7 +134,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.DISTANCE
}
resp = self.call("doris/search/query_sku", params)
resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0)
def test_query_seckill(self):
......@@ -144,7 +144,7 @@ class SearchTestCase(DorisTestCase):
"is_seckill":True
}
}
resp = self.call("doris/search/query_sku", params)
resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0)
def test_recall_board(self):
......@@ -155,5 +155,5 @@ class SearchTestCase(DorisTestCase):
def test_recall_boadr_api(self):
params = {"query": u'医生',"filters":{"city_tag_id":576}}
resp = self.call("doris/search/board", params)
resp = self.call("dymas/search/board", params)
print(resp.result)
\ No newline at end of file
......@@ -14,7 +14,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind("doris/query/answer")
@bind("dymas/query/answer")
def filter_answer(query="", offset=0, size=10, filters={}, sort_type=ANSWER_SORT_TYPE.DEFAULT, sort_params={},
have_read_answer_list=[]):
logging.info("get context:%s" % context)
......@@ -55,7 +55,7 @@ def filter_answer(query="", offset=0, size=10, filters={}, sort_type=ANSWER_SORT
return {"answer_ids": [], "answer_extra": []}
@bind('doris/search/qa_sort')
@bind('dymas/search/qa_sort')
def answer_sort(filters=None, offset=0, size=10, use_fresh_tag=False, device_id='', source_type=-1):
try:
"""
......@@ -148,7 +148,7 @@ def answer_sort(filters=None, offset=0, size=10, use_fresh_tag=False, device_id=
return {'answer_id_list': []}
@bind('doris/search/qa_check_in')
@bind('dymas/search/qa_check_in')
def qa_check_in(device_id,size):
try:
key = 'device_register_qa_queue:'+str(device_id)
......
......@@ -5,7 +5,7 @@ from search.utils.article import recall_art
@bind("doris/query/article")
@bind("dymas/query/article")
def filter_article(query, offset, size, filters={}, sort_type=ARTICLE_SORT_TYPE.DEFAULT, sort_params={},use_fresh_tag=False):
articles = recall_art(query, offset, size, filters,use_fresh_tag)
article_list = []
......
from gm_rpcd.all import bind
from search.utils.board import recall_board
@bind("doris/search/board")
@bind("dymas/search/board")
def search_board(query, filters = {},offset=0, size=2):
board_ids = recall_board(query,offset, size,filters)
return {"board_ids":board_ids}
......
......@@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
# top_data={CARD_TYPE.DIARY: [], CARD_TYPE.USERTOPIC: [], CARD_TYPE.QA: [], }
@bind("doris/search/content_aggre_communit_sort")
@bind("dymas/search/content_aggre_communit_sort")
def content_aggre_communit_sort(current_tag=[], size=10, offset=0, is_video=False, sort_type=CONTENT_AGGRE_SORT.DEFAULT,
sun_tag=[], parent_tag=[], device_id="", user_city_tag_id=None, in_whitelist=False,
top_data={CARD_TYPE.DIARY: [], CARD_TYPE.USERTOPIC: [], CARD_TYPE.QA: []}):
......@@ -1308,7 +1308,7 @@ def _get_tractate_ret_list(ret_list, tractate_results_list, tractate_index, scor
return (True, tractate_index)
@bind("doris/search/content_aggre_sku_sort")
@bind("dymas/search/content_aggre_sku_sort")
def content_aggre_sku_sort(current_tag=[], size=10, offset=0, sun_tag=[], parent_tag=[], user_city_tag_id=None,
in_whitelist=False, source_from="sku"):
"""
......@@ -1687,7 +1687,7 @@ def process_sorting(sort_params):
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
@bind("doris/search/category_aggre_sort")
@bind("dymas/search/category_aggre_sort")
def category_aggre_sort(current_tag=[], size=10, offset=0, device_id="", user_city_tag_id=None, in_whitelist=False,
is_video=False, need_cpc_data=False):
"""
......@@ -2125,7 +2125,7 @@ def get_answer_data_category(all_new_tag=[], have_read_dict=[], offset=0, size=1
# ai扫脸或测肤报告页最美购或日记分类展示,下面参数tag_list是列表嵌套列表
@bind("doris/search/ai_content")
@bind("dymas/search/ai_content")
def ai_content(has_order, tag_list, in_whitelist, user_city_tag_id, device_id):
if has_order:
data = ai_service(tag_list, in_whitelist, user_city_tag_id, device_id)
......@@ -2272,7 +2272,7 @@ def ai_diary(tag_list, in_whitelist, user_city_tag_id, device_id):
# ai测肤报告页最上面美购或日记展示。下面参数tag_list是列表嵌套列表
@bind("doris/search/skin_ai_total_content")
@bind("dymas/search/skin_ai_total_content")
def skin_ai_total_content(has_order, tag_list, in_whitelist, user_city_tag_id, device_id):
if has_order:
data = skin_service(tag_list, in_whitelist, user_city_tag_id, device_id)
......
......@@ -2110,7 +2110,7 @@ def index_filter_diary(filters, offset=0, size=10):
# todo
# 取美购列表中美购关联的日记本
# 排序按照首页精选排序
@bind('doris/search/get_diaries_by_special_id')
@bind('dymas/search/get_diaries_by_special_id')
def get_diaries_by_special_id(special_id, offset=0, size=10):
filters = {"special_id": special_id}
hitids = index_filter_diary(filters, offset, size)
......@@ -2120,14 +2120,14 @@ def get_diaries_by_special_id(special_id, offset=0, size=10):
# todo
# 取美购列表中美购关联的日记本
# 排序按照首页精选排序
@bind('doris/search/get_index_diaries')
@bind('dymas/search/get_index_diaries')
def get_index_diaries(offset=0, size=10):
hitids = index_filter_diary({}, offset, size)
return {'diaries': hitids}
# 将gaia 请求es日记数据代码合并过来
@bind("doris/search/query_diary")
@bind("dymas/search/query_diary")
def query_diary(
query='',
offset=0,
......@@ -2172,7 +2172,7 @@ def query_diary(
return res
@bind("doris/search/query_diary_alpha")
@bind("dymas/search/query_diary_alpha")
def query_diary_alpha(
query='',
offset=0,
......@@ -2196,7 +2196,7 @@ def query_diary_alpha(
# 将gaia 请求es日记数据代码合并过来
@bind("doris/search/query_filter_diary")
@bind("dymas/search/query_filter_diary")
def query_filter_diary(
offset=0,
size=5,
......@@ -2214,7 +2214,7 @@ def query_filter_diary(
filter_invalid_picture, fields, use_fresh_tag, device_id, source_type)
@bind("doris/search/diaries")
@bind("dymas/search/diaries")
def get_diaries(query='', offset=0, size=10, user_city_tag_id=None, sort_type=DIARY_ORDER_TYPE.DEFAULT, filters={}):
sort_params = {}
if user_city_tag_id:
......
......@@ -404,7 +404,7 @@ def filter_doctor(offset=0, size=5, sort_type=DOCTOR_ORDER_TYPE.DEFAULT2, filter
#todo
#取美购列表中美购关联的医生
#排序按照找医生默认排序输出
@bind('doris/search/get_doctors_by_special_id')
@bind('dymas/search/get_doctors_by_special_id')
def get_doctors_by_special_id(special_id, offset=0, size=10, sort_type=DOCTOR_ORDER_TYPE.DEFAULT):
nested_fields = { "special_id": special_id}
es_data = filter_doctor(
......
......@@ -77,7 +77,7 @@ def get_device_unread(device_id, tab_type, feed_type, city_id, offset, size,
return ret if ret else recommends[:size]
@bind("doris/recommend/home_feed")
@bind("dymas/recommend/home_feed")
def get_home_feed_recommend(device_id, tab_type, feed_type, offset, size, city_id, **kwargs):
"""获取首页feed推荐的id列表。
......@@ -91,7 +91,7 @@ def get_home_feed_recommend(device_id, tab_type, feed_type, offset, size, city_i
return {feed_type: res}
@bind("doris/recommend/video_tab")
@bind("dymas/recommend/video_tab")
def get_video_tab_recommend(card_type, offset, size, device_id, source_type, **kwargs):
try:
logging.info("get redis_client:%s" % redis_client)
......
......@@ -36,7 +36,7 @@ def label_key(label):
return LABEL_VALUE.get(label)
@bind('doris/query/inference')
@bind('dymas/query/inference')
def query_inference(query=''):
try:
labels = list()
......
......@@ -15,7 +15,7 @@ MAX_LOAD = 200
GROUP_SIZE = 10
@bind('doris/search/query_principal')
@bind('dymas/search/query_principal')
def query_principal(query='', doctor_type=0, offset=0, size=10):
now = int(time.time())
......@@ -61,7 +61,7 @@ def query_principal(query='', doctor_type=0, offset=0, size=10):
return {'video_list': [], "tractate_list": []}
@bind('doris/search/query_principal_sort')
@bind('dymas/search/query_principal_sort')
def query_principal_sort(query='', doctor_type=0, offset=0, size=10):
"""
医生医院二级页面混排
......@@ -710,7 +710,7 @@ def get_two_page_data(query, doctor_type):
return []
@bind("doris/search/user_principal")
@bind("dymas/search/user_principal")
def user_principal(query=0, offset=0, size=10, show_type=[]):
try:
channel_type = 0
......@@ -932,7 +932,7 @@ def user_principal(query=0, offset=0, size=10, show_type=[]):
return {'user_principal_sort': []}
@bind("doris/search/user_photoalbum_sort")
@bind("v/search/user_photoalbum_sort")
def get_user_album(user_id=-1, offset=0, size=10):
"""
用户主页下的相册的排序 日记问答帖子的排序
......
......@@ -56,7 +56,7 @@ def query_by_question_term(es, term, sort, offset, size):
return hit_ids
@bind('doris/filter/question')
@bind('dymas/filter/question')
def filter_question(tag_id, sort_type, offset=0, size=10, filters={},use_fresh_tag=False):
# term = {"term": {"closure_tag_ids": tag_id}}
# es = get_es()
......@@ -82,12 +82,12 @@ def filter_question(tag_id, sort_type, offset=0, size=10, filters={},use_fresh_t
return {"questions": question_ids}
@bind("doris/search/recommend_question")
@bind("dymas/search/recommend_question")
def recommend_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_ORDER_TYPE.DEFAULT):
res = recall_recommend_question_and_sku(query,offset,size,filters,sort_type)
return {"result":res}
@bind("doris/search/question")
@bind("dymas/search/question")
def search_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_ORDER_TYPE.DEFAULT, drop_duplicated=True, need_diary_data=False):
tail = offset + size
question_ids = []
......@@ -130,7 +130,7 @@ def search_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_
return {"question_problem_ids": question_ids}
@bind('doris/filter/top_question')
@bind('dymas/filter/top_question')
def filter_top_question(sort_type=TOP_QUESTION_ORDER_TYPE.DEFAULT, filters={}, offset=0, size=10):
"""
召回置顶问题
......
......@@ -59,7 +59,7 @@ class Tag(models.Model):
tag_type = models.CharField(verbose_name=u'标签类型', max_length=128)
@bind('doris/search/get_relation_query')
@bind('dymas/search/get_relation_query')
def get_relation_query(query="", size=6, offset=0, device_id=""):
"""
搜索相关
......@@ -120,7 +120,7 @@ def get_relation_query(query="", size=6, offset=0, device_id=""):
return {"relation_search_word": []}
@bind('doris/search/get_default_word')
@bind('dymas/search/get_default_word')
def get_default_word(device_id=""):
"""
个性化展示数据限制为9个,热门词4-5个,运营配置词1-2个,总数保证为15个
......@@ -166,7 +166,7 @@ def get_default_word(device_id=""):
#
@bind('doris/search/feed_other_watch')
@bind('dymas/search/feed_other_watch')
def feed_other_watch(device_id="", tag_ids=[], size=4):
"""
个性化展示数据限制为9个,热门词4-5个,运营配置词1-2个,总数保证为15个
......
......@@ -230,7 +230,7 @@ def _get_article_ret_list(ret_list, article_results_list, article_index, score_b
return (True, article_index)
@bind("doris/search/query_comprehensive")
@bind("dymas/search/query_comprehensive")
def query_comprehensive(query='',
offset=0,
size=10,
......
......@@ -12,7 +12,7 @@ import logging
import time
@bind('doris/search/guess_you_like_service')
@bind('dymas/search/guess_you_like_service')
def guess_you_like_service(hospital_id=None, tag_id=None, user_city_info=None,
doctor_id=None, offset=0, size=10):
"""
......
......@@ -303,7 +303,7 @@ def query_sku(query='', user_city_tag_id=None, offset=0, size=2,
# @param sort_params 排序条件
# @date 20180409
@bind('doris/search/as_query_sku')
@bind('dymas/search/as_query_sku')
def as_query_sku(query='', user_city_tag_id=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[], must_filters=False,
inner_hits=False, have_get_service_ids=[]):
......@@ -393,7 +393,7 @@ def as_query_sku(query='', user_city_tag_id=None, offset=0, size=10,
return {"sku_ids": [], "rank_mode": RANK_MODE.DEFAULT, "is_cpc": []}
@bind('doris/search/as_query_sku_pure')
@bind('dymas/search/as_query_sku_pure')
def as_query_sku_pure(query='', user_city_tag_id=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]):
"""基于sku mapping的es高级搜索"""
......@@ -784,7 +784,7 @@ def get_mix_floor_hits(offset=0, size=10, special_id=None, sort_type=SERVICE_ORD
return {}, RANK_MODE.DEFAULT
@bind('doris/search/seckill')
@bind('dymas/search/seckill')
def seckill_query(special_id, user_city_info=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]):
"""秒杀美购列表
......@@ -839,7 +839,7 @@ def seckill_query(special_id, user_city_info=None, offset=0, size=10,
return {'skus': skus_info, 'rank_mode': rest_result['rank_mode']}
@bind('doris/search/special')
@bind('dymas/search/special')
def special_query(special_id, user_city_info=None, floor_id=None,
offset=0, size=10, sort_type=SERVICE_ORDER_TYPE.DEFAULT,
filters={}, sort_params={}, or_filters=[], mix_floor=False):
......@@ -923,7 +923,7 @@ def special_query(special_id, user_city_info=None, floor_id=None,
return {'skus': skus_info, 'rank_mode': result['rank_mode']}
@bind('doris/search/judge_service_cpc')
@bind('dymas/search/judge_service_cpc')
def judge_service_cpc(service_ids=[]):
"""
统计接口判断美购是否是cpc
......@@ -968,7 +968,7 @@ def judge_service_cpc(service_ids=[]):
return []
@bind('doris/search/service_home_recommend')
@bind('dymas/search/service_home_recommend')
def recommend_service_feed(device_id="", offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT,
filters=None, sort_params=None,
......@@ -1158,7 +1158,7 @@ def recommend_service_feed(device_id="", offset=0, size=10,
return {"user_portrait_data": {}, "normal_sort_data": {}}
@bind('doris/search/content_detail_service')
@bind('dymas/search/content_detail_service')
def content_detail_service(card_id=-1, card_type=None, card_author_message={}, user_city_tag_id=-1, tags={}, size=3,
related_serviceid=[]):
"""
......
......@@ -6,7 +6,7 @@ from recommend.utils.device import get_realtime_interest
from search.utils.service import recall_spu, SMARTRANK_SORT
@bind('doris/search/query_spu')
@bind('dymas/search/query_spu')
def query_spu(query='', user_city_tag_id=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]):
if sort_type == SERVICE_ORDER_TYPE.DEFAULT_REALTIME and ('device_id' in sort_params):
......
......@@ -14,7 +14,7 @@ from libs.algorithms import variousness,variousness_for_problem
from search.utils.subscript_article import recall_subscript_article
@bind('doris/filter/subscript_article')
@bind('dymas/filter/subscript_article')
def filter_subscript_article(query, sort_type=SUBSCRIPT_ARTICLE_SORT.ORDERING, offset=0, count=10, filters={}):
"""搜索公众号文章。
......
......@@ -257,7 +257,7 @@ def query_filter_comprehensive_tractate(query=None, have_read_tractate_list=[],
return dict()
@bind('doris/search/query_filter_tractate')
@bind('dymas/search/query_filter_tractate')
def query_filter_tractate(query=None, offset=0, size=10, have_read_tractate_list=[], use_fresh_tag=False,
device_id=""):
try:
......@@ -411,7 +411,7 @@ def scatter(data, size):
return data[:size]
@bind('doris/search/tractate_sort')
@bind('dymas/search/tractate_sort')
def tractate_sort(filters=None, offset=0, size=10, query=None, use_fresh_tag=False, device_id='', source_type=0,
get_query=False, have_read_tractate=[], noarea_tags=[], all_tags=[], content_star_keyword=[]):
try:
......@@ -639,7 +639,7 @@ def tractate_sort(filters=None, offset=0, size=10, query=None, use_fresh_tag=Fal
return {'tractate_id_list': []}
@bind('doris/search/doctor_tractate_sort')
@bind('dymas/search/doctor_tractate_sort')
def doctor_tractate_sort(filters=None, offset=0, size=10, query=None):
try:
filters = filters or {}
......@@ -686,7 +686,7 @@ def doctor_tractate_sort(filters=None, offset=0, size=10, query=None):
return {'tractate_id_list': []}
@bind('doris/search/tractate_hotword')
@bind('dymas/search/tractate_hotword')
def tractate_hotword(query='', size=10):
try:
redis_key = "gaia:hot_tractate_keyword:city_id:" + str(query)
......@@ -702,7 +702,7 @@ def tractate_hotword(query='', size=10):
return {"hot_recommends": []}
@bind('doris/search/tractate_check_in')
@bind('dymas/search/tractate_check_in')
def tractate_check_in(device_id, size):
try:
key = 'device_register_tractate_queue:' + str(device_id)
......
......@@ -14,7 +14,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind('doris/search/query_wiki')
@bind('dymas/search/query_wiki')
def query_wiki(query='', offset=0, size=10):
try:
......@@ -142,7 +142,7 @@ def query_wiki(query='', offset=0, size=10):
return {'wiki_all': []}
@bind('doris/search/wiki_sort')
@bind('dymas/search/wiki_sort')
def wiki_sort(filters=None, offset=0, size=10):
try:
filters = filters or {}
......
......@@ -18,7 +18,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind('doris/search/query_wikitab_keyword')
@bind('dymas/search/query_wikitab_keyword')
def query_wiki_keyword(query, offset=0, size=10, flag=False):
try:
wiki_hot_keyword = HotKeyWord.fetch_keyword(query)
......
......@@ -22,7 +22,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind('doris/search/query_wikitab')
@bind('dymas/search/query_wikitab')
def query_wiki(query='', offset=0, size=10, city_id='', source_type="tab", device_id=""):
size = min(size, MAX_LOAD)
......@@ -655,7 +655,7 @@ def get_zonghe_query(query, synonym_term_list):
return []
@bind('doris/search/query_wiki_card')
@bind('dymas/search/query_wiki_card')
def get_collect_wiki_card(query=""):
try:
all_data = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment