Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
docs
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
docs
Commits
0a685028
Commit
0a685028
authored
Jul 08, 2015
by
柯阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search doc completed
parent
9f4adf46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
0 deletions
+108
-0
search.md
search.md
+108
-0
No files found.
search.md
View file @
0a685028
...
@@ -23,8 +23,116 @@
...
@@ -23,8 +23,116 @@
offset=0,
offset=0,
size=5,
size=5,
sort_type=DOCTOR_ORDER_TYPE.DEFAULT2, # 排序方式,参见api.models.types.DOCTOR_ORDER_TYPE
sort_type=DOCTOR_ORDER_TYPE.DEFAULT2, # 排序方式,参见api.models.types.DOCTOR_ORDER_TYPE
filters={ # 过滤器
'province_tag_id': 省份tag id,
'tag_ids': [需要过滤的tag id1, tag id2, ...] # 注意是"或"的关系
}
)
## 日记本
*
日记本搜索:
`search.utils.diary.search_diary`
def search_diary(
query='', # 搜索query
offset=0,
size=5,
sort_type=DIARY_ORDER_TYPE.DEFAULT, # 排序方式,参见api.models.types.DIARY_ORDER_TYPE
filters={ # 过滤器
'province_tag_id': 省份tag id,
'bodypart_tag_id': 一级tag id,
'bodypart_subitem_tag_id': 二级tag id,
}
)
*
日记本过滤:
`search.utils.diary.filter_diary`
def filter_diary(
offset=0,
size=5,
sort_type=DIARY_ORDER_TYPE.LAST_UPDATE_TIME, # 排序方式,参见api.models.types.DIARY_ORDER_TYPE
filters={ # 过滤器
'province_tag_id': 省份tag id,
'doctor_id': 医生tag id,
'hospital_id': 医院tag id,
'service_id': 关联福利tag id,
'tag_ids': [需要过滤的tag id1, tag id2, ...] # 注意是"或"的关系
},
nfilters={ # 反向过滤器(满足条件的会被筛除)
'id': 需要排除的日记本id,
}
)
## 百科
*
百科搜索:
`search.utils.itemwiki.search_itemwiki`
search_itemwiki(
query='', # 搜索query
offset=0,
size=5
)
## 福利
*
福利搜索:
`search.utils.service.search_service`
def search_service(
query='', # 搜索query
user_city_tag_id=None, # 用户所在城市tag id
offset=0,
size=5,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, # 排序方式,参见api.models.types.SERVICE_ORDER_TYPE
filters={
filters={
'province_tag_id': 省份tag id,
'province_tag_id': 省份tag id,
'bodypart_tag_id': 一级tag id,
}
)
*
福利过滤:
`search.utils.service.filter_service`
def filter_service(
user_city_tag_id=None, # 用户所在城市tag id
offset=0,
size=5,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, # 排序方式,参见api.models.types.SERVICE_ORDER_TYPE
filters={
'channel': 频道,
'doctor_id': 关联医生id,
'hospital_id': 关联医院id,
'tag_ids': [需要过滤的tag id1, tag id2, ...] # 注意是"或"的关系
'tag_ids': [需要过滤的tag id1, tag id2, ...] # 注意是"或"的关系
}
}
)
)
## tag/圈子
*
tag搜索:
`search.utils.tag.search_tag`
search_tag(
query='', # 搜索query
offset=0,
size=5
)
## 帖子
*
帖子搜索:
`search.utils.topic.search_topic`
search_topic(
query='', # 搜索query
offset=0,
size=5
)
*
帖子过滤:
`search.utils.topic.filter_topic`
def filter_topic(
offset=0,
size=5,
sort_type=PROBLEM_ORDER_TYPE.DEFAULT,
filters={
'tag_ids': [需要过滤的tag id1, tag id2, ...] # 注意是"或"的关系,
'is_elite': True, # 会筛选出标记了"所长精选"或"热门推荐",
'topic_type': 帖子类型,
}
)
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