Fix annotating results and remove debugging code

This commit is contained in:
2022-11-23 18:39:36 +00:00
parent c49c8898eb
commit 1bdd332e6e
4 changed files with 10 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ class ElasticsearchBackend(StorageBackend):
extra_should = []
extra_should2 = []
if num:
extra_must.append({"equals": {"num": num}})
extra_must.append({"match_phrase": {"num": num}})
if net:
extra_must.append({"match_phrase": {"net": net}})
if channel:
@@ -321,10 +321,12 @@ class ElasticsearchBackend(StorageBackend):
search_query,
index=index,
)
if "message" in response:
return response
# A/D/R - Annotate/Dedup/Reverse
self.process_results(
response,
response["object_list"],
annotate=annotate,
dedup=dedup,
dedup_fields=dedup_fields,