diff --git a/server/routes/shared_api/autocomplete/helpers.py b/server/routes/shared_api/autocomplete/helpers.py index 668da7f2b6..1b05e1c851 100644 --- a/server/routes/shared_api/autocomplete/helpers.py +++ b/server/routes/shared_api/autocomplete/helpers.py @@ -75,7 +75,9 @@ def find_queries(user_query: str) -> List[str]: cumulative = "" last_word = words_in_query[-1].lower().strip() - if last_word in SKIP_AUTOCOMPLETE_TRIGGER: + if last_word in SKIP_AUTOCOMPLETE_TRIGGER or ( + last_word == "" and len(words_in_query) > 1 and + words_in_query[-2].lower().strip() in SKIP_AUTOCOMPLETE_TRIGGER): # don't return any queries. return []