Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Fixed semantic-search filtering by collection (#66286)

Nathan Voxland520de22c5e99
diff --git a/enterprise/backend/src/metabase_enterprise/semantic_search/index.clj b/enterprise/backend/src/metabase_enterprise/semantic_search/index.clj
index 1c7df60e2d2..797b6b352e2 100644
--- a/enterprise/backend/src/metabase_enterprise/semantic_search/index.clj
+++ b/enterprise/backend/src/metabase_enterprise/semantic_search/index.clj
@@ -472,7 +472,7 @@
(defn- search-filters
"Generate WHERE conditions based on search context filters."
- [{:keys [archived? verified models created-at created-by last-edited-at last-edited-by table-db-id ids display-type collection]}]
+ [{:keys [archived? verified models created-at created-by last-edited-at last-edited-by table-db-id ids display-type]}]
(let [conditions (filter some?
[(when (some? archived?)
[:= :archived archived?])
@@ -486,8 +486,6 @@
[:in :last_editor_id last-edited-by])
(when table-db-id
[:= :database_id table-db-id])
- (when collection
- [:= :collection_id collection])
(when (seq ids)
[:in :model_id (map str ids)])
(when (seq display-type)
diff --git a/src/metabase/analytics/prometheus.clj b/src/metabase/analytics/prometheus.clj
index 03a4d4d7bb4..0570adc5e28 100644
--- a/src/metabase/analytics/prometheus.clj
+++ b/src/metabase/analytics/prometheus.clj
@@ -327,6 +327,8 @@
{:description "Total number of ms spent filtering readable docs"})
(prometheus/counter :metabase-search/semantic-collection-filter-ms
{:description "Total number of ms spent filtering search results by collection"})
+ (prometheus/counter :metabase-search/semantic-collection-id-filter-ms
+ {:description "Total number of ms spent filtering search results by collection id"})
(prometheus/counter :metabase-search/semantic-search-ms
{:description "Total number of ms spent performing a semantic search"
:labels [:embedding-model]})