From f571d10497f723aafd8d7be68182083304d18cd8 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Thu, 27 Feb 2025 12:30:33 -0600 Subject: [PATCH] Removed legacy example Signed-off-by: Andre Wanlin --- docs/features/search/how-to-guides.md | 34 --------------------------- 1 file changed, 34 deletions(-) diff --git a/docs/features/search/how-to-guides.md b/docs/features/search/how-to-guides.md index 007b108df5..0476ef6c24 100644 --- a/docs/features/search/how-to-guides.md +++ b/docs/features/search/how-to-guides.md @@ -111,40 +111,6 @@ indexBuilder.addCollator({ }); ``` -## How to limit what can be searched in the Software Catalog - -The Software Catalog includes a wealth of information about the components, -systems, groups, users, and other aspects of your software ecosystem. However, -you may not always want _every_ aspect to appear when a user searches the -catalog. Examples include: - -- Entities of kind `Location`, which are often not useful to Backstage users. -- Entities of kind `User` or `Group`, if you'd prefer that users and groups be - exposed to search in a different way (or not at all). - -It's possible to write your own [Collator](./concepts.md#collators) to control -exactly what's available to search, (or a [Decorator](./concepts.md#decorators) -to filter things out here and there), but the `DefaultCatalogCollator` that's -provided by `@backstage/plugin-catalog-backend` offers some configuration too! - -```ts title="packages/backend/src/plugins/search.ts" -indexBuilder.addCollator({ - defaultRefreshIntervalSeconds: 600, - collator: DefaultCatalogCollator.fromConfig(env.config, { - discovery: env.discovery, - tokenManager: env.tokenManager, - /* highlight-add-start */ - filter: { - kind: ['API', 'Component', 'Domain', 'Group', 'System', 'User'], - }, - /* highlight-add-end */ - }), -}); -``` - -As shown above, you can add a catalog entity filter to narrow down what catalog -entities are indexed by the search engine. - ## How to customize search results highlighting styling The default highlighting styling for matched terms in search results is your