From 1a34deb36feee08188dcad69809fdfb801fb1597 Mon Sep 17 00:00:00 2001 From: Rohin Bhargava Date: Fri, 13 Dec 2024 17:50:49 -0500 Subject: [PATCH 1/2] revert algolia records v1 --- servers/fdr/src/services/algolia/AlgoliaService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/fdr/src/services/algolia/AlgoliaService.ts b/servers/fdr/src/services/algolia/AlgoliaService.ts index 87dac96652..66a0ecc39b 100644 --- a/servers/fdr/src/services/algolia/AlgoliaService.ts +++ b/servers/fdr/src/services/algolia/AlgoliaService.ts @@ -1,7 +1,7 @@ import { APIV1Db, DocsV1Db } from "@fern-api/fdr-sdk"; import algolia, { type SearchClient } from "algoliasearch"; import { type FdrApplication } from "../../app"; -import { AlgoliaSearchRecordGeneratorV2 } from "./AlgoliaSearchRecordGeneratorV2"; +import { AlgoliaSearchRecordGenerator } from "./AlgoliaSearchRecordGenerator"; import type { AlgoliaSearchRecord, ConfigSegmentTuple } from "./types"; export interface AlgoliaService { @@ -51,7 +51,7 @@ export class AlgoliaServiceImpl implements AlgoliaService { configSegmentTuples: ConfigSegmentTuple[]; }) { return configSegmentTuples.flatMap(([config, indexSegment]) => { - const generator = new AlgoliaSearchRecordGeneratorV2({ docsDefinition, apiDefinitionsById }); + const generator = new AlgoliaSearchRecordGenerator({ docsDefinition, apiDefinitionsById }); if (config == null) { return []; From 1f4b0972dfff70e1375ea726f5742401ebb58140 Mon Sep 17 00:00:00 2001 From: Rohin Bhargava Date: Fri, 13 Dec 2024 18:21:40 -0500 Subject: [PATCH 2/2] remove unnecessary comment --- servers/fdr/src/services/algolia/AlgoliaService.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/servers/fdr/src/services/algolia/AlgoliaService.ts b/servers/fdr/src/services/algolia/AlgoliaService.ts index 66a0ecc39b..75f4286a96 100644 --- a/servers/fdr/src/services/algolia/AlgoliaService.ts +++ b/servers/fdr/src/services/algolia/AlgoliaService.ts @@ -56,9 +56,6 @@ export class AlgoliaServiceImpl implements AlgoliaService { if (config == null) { return []; } - // const generator = getConfig().algoliaSearchV2Domains.some((domains) => url.includes(domains)) - // ? new AlgoliaSearchRecordGeneratorV2({ docsDefinition, apiDefinitionsById }) - // : new AlgoliaSearchRecordGenerator({ docsDefinition, apiDefinitionsById }); return generator.generateAlgoliaSearchRecordsForSpecificDocsVersion(config, indexSegment); }); }