reports.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:correctiv-nursinghomes 作者: correctiv 项目源码 文件源码
def search_reports(state, must_terms, should_terms):
    s = Report.search()
    q = Q('bool',
        must=[Q('match', body=term) for term in must_terms],
        should=[Q('match', body=term) for term in should_terms],
        minimum_should_match=1
    )
    s = s.filter('terms', state=[state]).query(q)
    response = s.execute()
    return response.to_dict()['hits']['hits']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号