deduplicate over date_begin and date_end instead of date_range

This commit is contained in:
Matthäus Wander
2021-06-07 00:03:39 +02:00
parent 0aa7d84d0d
commit 4bc7b0b62c

View File

@@ -317,8 +317,8 @@ def save_aggregate_report_to_elasticsearch(aggregate_report,
org_name_query = Q(dict(match_phrase=dict(org_name=org_name)))
report_id_query = Q(dict(match_phrase=dict(report_id=report_id)))
domain_query = Q(dict(match_phrase={"published_policy.domain": domain}))
begin_date_query = Q(dict(match=dict(date_range=begin_date)))
end_date_query = Q(dict(match=dict(date_range=end_date)))
begin_date_query = Q(dict(match=dict(date_begin=begin_date)))
end_date_query = Q(dict(match=dict(date_end=end_date)))
if index_suffix is not None:
search = Search(index="dmarc_aggregate_{0}*".format(index_suffix))