From 82a23de13c43400a069d038bfe8e6397df7047b3 Mon Sep 17 00:00:00 2001 From: Jake Cahill <45230295+JakeSCahill@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:21:34 +0100 Subject: [PATCH] Fix indexer for APIs (#86) We updated the product name and tags to use Self-Managed. However, the API docs are still being indexed under 'Redpanda' leading to API reference docs not showing in the search by default. This PR fixes that. --- scripts/index-api/index-api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/index-api/index-api.js b/scripts/index-api/index-api.js index ef16601..38946b8 100644 --- a/scripts/index-api/index-api.js +++ b/scripts/index-api/index-api.js @@ -60,14 +60,14 @@ async function indexUrlsInAlgolia(urls) { const { pathname } = new URL(url); return { objectID: pathname, - product: "Redpanda", + product: "Self-Managed", version: data.latestVersion, title: data.h1, titles: data.titles, intro: data.intro, unixTimestamp: unixTimestamp, type: 'Doc', - _tags: [`Redpanda v${data.latestVersion}`] + _tags: [`Self-Managed v${data.latestVersion}`] }; } catch (error) { console.error(`Error processing URL ${url}:`, error); @@ -98,4 +98,4 @@ async function generateAlgoliaIndex(sitemapUrl) { generateAlgoliaIndex(SITEMAP_URL) .then(() => console.log('Indexing completed!')) - .catch(error => console.error('Indexing failed:', error)); \ No newline at end of file + .catch(error => console.error('Indexing failed:', error));