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'
This commit is contained in:
Debanjum Singh Solanky 2023-10-12 20:45:22 -07:00
parent 72f8fde7ef
commit 7190b3811d

View file

@ -387,7 +387,7 @@ async def search(
# Encode query with filter terms removed # Encode query with filter terms removed
defiltered_query = user_query defiltered_query = user_query
for filter in [DateFilter(), WordFilter(), FileFilter()]: for filter in [DateFilter(), WordFilter(), FileFilter()]:
defiltered_query = filter.defilter(user_query) defiltered_query = filter.defilter(defiltered_query)
encoded_asymmetric_query = None encoded_asymmetric_query = None
if t == SearchType.All or t != SearchType.Image: if t == SearchType.All or t != SearchType.Image: