From 6ac1530816d9e9ce350c241291b0664129e3f2e3 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Fri, 6 Jun 2025 14:46:47 -0700 Subject: [PATCH] More robustly default to searching all content type --- src/khoj/routers/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index d9ff8c29..65d4d7b1 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -1337,7 +1337,7 @@ async def execute_search( user: KhojUser, q: str, n: Optional[int] = 5, - t: Optional[state.SearchType] = state.SearchType.All, + t: Optional[state.SearchType] = None, r: Optional[bool] = False, max_distance: Optional[Union[float, None]] = None, dedupe: Optional[bool] = True, @@ -1360,6 +1360,7 @@ async def execute_search( # initialize variables user_query = q.strip() results_count = n or 5 + t = t or state.SearchType.All search_futures: List[concurrent.futures.Future] = [] # return cached results, if available