Skip to content

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

Add documents to search page (#74595)

Nick Fitzpatrick0ff0bc8dcc89
diff --git a/e2e/test/scenarios/search/search-filters.cy.spec.js b/e2e/test/scenarios/search/search-filters.cy.spec.js
index 3625d386769..1222f4f6cfb 100644
--- a/e2e/test/scenarios/search/search-filters.cy.spec.js
+++ b/e2e/test/scenarios/search/search-filters.cy.spec.js
@@ -44,6 +44,10 @@ const typeFilters = [
label: "Indexed record",
type: "indexed-entity",
},
+ {
+ label: "Document",
+ type: "document",
+ },
];
const { ORDERS_ID, PRODUCTS_ID } = SAMPLE_DATABASE;
@@ -157,6 +161,20 @@ describe("scenarios > search", () => {
valueName: "TITLE",
});
});
+
+ H.createDocument({
+ name: "Releases overview",
+ document: {
+ type: "doc",
+ content: [
+ {
+ type: "paragraph",
+ attrs: { _id: "1" },
+ content: [{ type: "text", text: "Document body" }],
+ },
+ ],
+ },
+ });
});
typeFilters.forEach(({ label, type }) => {
diff --git a/frontend/src/metabase/search/constants.ts b/frontend/src/metabase/search/constants.ts
index fff55c8f5af..dfd4b1edd02 100644
--- a/frontend/src/metabase/search/constants.ts
+++ b/frontend/src/metabase/search/constants.ts
@@ -22,6 +22,7 @@ export const enabledSearchTypes: EnabledSearchModel[] = [
"table",
"action",
"indexed-entity",
+ "document",
];
export const SearchContextTypes = {