Commit fa270f76 authored by lixiaofang's avatar lixiaofang

add

parent 9f326d55
......@@ -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=[]):
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()
......@@ -123,6 +124,11 @@ 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)
pictorial_ids_list = []
......
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