From 7190b3811d82ca3179622ce9f3265bc608102513 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Thu, 12 Oct 2023 20:45:22 -0700 Subject: [PATCH] Remove all filter terms in user query from defiltered_query Previously only the the last filter's terms were getting effectively applied as the `filter.defilter' operation was being done on `user_query' but was updating the `defiltered_query' --- src/khoj/routers/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/khoj/routers/api.py b/src/khoj/routers/api.py index db88324a..ff2d88a2 100644 --- a/src/khoj/routers/api.py +++ b/src/khoj/routers/api.py @@ -387,7 +387,7 @@ async def search( # Encode query with filter terms removed defiltered_query = user_query for filter in [DateFilter(), WordFilter(), FileFilter()]: - defiltered_query = filter.defilter(user_query) + defiltered_query = filter.defilter(defiltered_query) encoded_asymmetric_query = None if t == SearchType.All or t != SearchType.Image: