Skip to content

Commit

Permalink
unify data_source keyword, and return organism for images
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledk2 committed Nov 29, 2024
1 parent 2332e03 commit ef83865
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions omero_search_engine/api/v1/resources/resource_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,20 @@ def prepare_search_results(results, size=0):
for hit in results["hits"]["hits"]:
res = hit["_source"]
resource = res.get("resource")
# ignore organism key in the results
# ignore
# key in the results
# please see (https://github.com/ome/omero_search_engine/issues/45)
#
# This will be checked later.
if (
resource == "image"
and res["Attribute"]
and res["Attribute"].lower() == "organism"
):
continue
# if (
# resource == "image"
# and res["Attribute"]
# and res["Attribute"].lower() == "organism"
# ):
# continue
row = {}
returned_results.append(row)
row["Data Source"] = res["data_source"]
row["data_source"] = res["data_source"]
row["Key"] = res["Attribute"]
row["Value"] = res["Value"]
row["Number of %ss" % resource] = res.get("items_in_the_bucket")
Expand Down

0 comments on commit ef83865

Please sign in to comment.