Commit 36c5a903 authored by lixiaofang's avatar lixiaofang

add

parent 3d3b29eb
......@@ -47,7 +47,8 @@ class GroupUtils(object):
return {"total_count": 0, "hits": []}
@classmethod
def get_hot_pictorial_recommend_result_list(cls, offset, size, es_cli_obj=None, attention_tag_list=[],have_read_pictorial_id_list=[]):
def get_hot_pictorial_recommend_result_list(cls, offset, size, es_cli_obj=None, attention_tag_list=[],
have_read_pictorial_id_list=[]):
try:
if not es_cli_obj:
es_cli_obj = ESPerform.get_cli()
......@@ -122,6 +123,9 @@ class GroupUtils(object):
q["_source"] = {
"includes": ["id"]
}
if have_read_pictorial_id_list:
q["query"]["function_score"]["query"]["bool"]["must_not"].append(
{"terms": {"id": have_read_pictorial_id_list}})
result_dict = ESPerform.get_search_results(es_cli_obj, "pictorial", q, offset, size)
......
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