From d558ac83b6ffb92a780daf5bd97ac2b421e2f61e Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 8 Oct 2024 08:01:31 -0500 Subject: [PATCH] Search fixes (#14217) * Ensure semantic search is enabled before checking model download state * Only clear similarity search when removing similarity pill --- web/src/components/input/InputWithTags.tsx | 7 ++++++- web/src/pages/Explore.tsx | 11 ++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/web/src/components/input/InputWithTags.tsx b/web/src/components/input/InputWithTags.tsx index 3e40b36c8..6c06e67e7 100644 --- a/web/src/components/input/InputWithTags.tsx +++ b/web/src/components/input/InputWithTags.tsx @@ -397,6 +397,11 @@ export default function InputWithTags({ setIsSimilaritySearch(false); }, [setFilters, resetSuggestions, setSearch, setInputFocused]); + const handleClearSimilarity = useCallback(() => { + removeFilter("event_id", filters.event_id!); + removeFilter("search_type", "similarity"); + }, [removeFilter, filters]); + const handleInputBlur = useCallback( (e: React.FocusEvent) => { if ( @@ -638,7 +643,7 @@ export default function InputWithTags({ Similarity Search