Skip to content

Commit

Permalink
FIx issue of returning keys inside a container
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledk2 committed Nov 28, 2024
1 parent 42b44db commit 09e2b78
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions omero_search_engine/api/v1/resources/resource_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ def process_container_query(table_, attribute_name, container_id, key, resourse)
container_project_values_key_template.substitute(key=key.strip())
)
else:
query["aggs"] = container_project_keys_template
query["aggs"] = json.loads(container_project_keys_template.substitute())
query["_source"] = {"includes": [""]}
res = search_index_for_value(res_index, query)
if key:
Expand Down Expand Up @@ -1026,10 +1026,9 @@ def process_container_query(table_, attribute_name, container_id, key, resourse)
"""
{"keys_search": {"nested": {"path": "key_values"},
"aggs": {"required_values": {"cardinality": {"field":
"key_values.name.keynamenormalize","precision_threshold": 4000,
},},"uniquesTerms": {"terms": {"field":
"key_values.name.keynamenormalize", "size": 10000}},},}}
"""
"key_values.name.keynamenormalize","precision_threshold": 4000
}},"uniquesTerms": {"terms": {"field":
"key_values.name.keynamenormalize", "size": 10000}}}}}"""
)
resource_keys_template = Template(
"""
Expand Down

0 comments on commit 09e2b78

Please sign in to comment.