Commit 9f4adf46 authored by 柯阳's avatar 柯阳

search api added

parent 028a28e2
# elasticsearch utils 接口文档
## 医生
* 医生搜索: `search.utils.doctor.search_doctor`
def search_doctor(
query='', # 搜索query
user_city_tag_id=None, # 用户所在城市tag id
offset=0, # 偏移量
size=5, # 返回结果个数
sort_type=DOCTOR_ORDER_TYPE.DEFAULT, # 排序方式,参见api.models.types.DOCTOR_ORDER_TYPE
filters={ # 过滤器
'province_tag_id': 省份tag id,
'bodypart_tag_id': 一级tag id,
}
)
* 医生过滤: `search.utils.doctor.filter_doctor`
def filter_doctor(
user_city_tag_id=None, # 用户所在城市tag id
offset=0,
size=5,
sort_type=DOCTOR_ORDER_TYPE.DEFAULT2, # 排序方式,参见api.models.types.DOCTOR_ORDER_TYPE
filters={
'province_tag_id': 省份tag id,
'tag_ids': [需要过滤的tag id1, tag id2, ...] # 注意是"或"的关系
}
)
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