Skip to content

Commit

Permalink
refactor search_results with generate_dsl, re #11477
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisgalen committed Sep 20, 2024
1 parent 2cc4b68 commit f265c72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arches/app/search/components/search_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ def generate_dsl(self, search_query_object, **kwargs):
)
)
search_query.must(subsearch_query)
search_query_object["query"].add_query(search_query)
return search_query, nested_agg

search_query_object["query"].add_aggregation(nested_agg)
def append_dsl(self, search_query_object, **kwargs):
dsl, aggregation = self.generate_dsl(search_query_object, **kwargs)
search_query_object["query"].add_query(dsl)
search_query_object["query"].add_aggregation(aggregation)

def post_search_hook(self, search_query_object, response_object, **kwargs):
permitted_nodegroups = kwargs.get("permitted_nodegroups")
Expand Down

0 comments on commit f265c72

Please sign in to comment.