Skip to content

Commit

Permalink
Fix indexer for APIs (#86)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JakeSCahill authored Oct 24, 2024
1 parent 9764d2e commit 82a23de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/index-api/index-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -98,4 +98,4 @@ async function generateAlgoliaIndex(sitemapUrl) {

generateAlgoliaIndex(SITEMAP_URL)
.then(() => console.log('Indexing completed!'))
.catch(error => console.error('Indexing failed:', error));
.catch(error => console.error('Indexing failed:', error));

0 comments on commit 82a23de

Please sign in to comment.