From 29d155dfdf4bf44be64c1c466f69c3847f9284cb Mon Sep 17 00:00:00 2001 From: YaphetKG Date: Mon, 12 Aug 2024 15:37:46 -0400 Subject: [PATCH] fix program query --- src/dug/core/async_search.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dug/core/async_search.py b/src/dug/core/async_search.py index 84304ee..e0f8f79 100644 --- a/src/dug/core/async_search.py +++ b/src/dug/core/async_search.py @@ -494,10 +494,10 @@ async def search_program(self, program_name=None, offset=0, size=None): # Add conditions based on user input if program_name: # Lowercase the program_name before adding it to the query - program_name = program_name.lower() - query_body["query"]["bool"]["must"].append({ - "match": {"data_type": program_name} - }) + # program_name = program_name.lower() + query_body["query"]["bool"]["must"].append( + {"term": {"data_type.keyword": program_name}} + ) #print("query_body", query_body)