Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(docs): point Algolia search at renamed docs_composio index (#3684)

Rahul Tarak61feaf277b68
diff --git a/.github/workflows/docs-search-sync.yml b/.github/workflows/docs-search-sync.yml
index 0dfa6c636..c4ba23729 100644
--- a/.github/workflows/docs-search-sync.yml
+++ b/.github/workflows/docs-search-sync.yml
@@ -18,13 +18,18 @@ permissions:
jobs:
sync-search:
runs-on: ubuntu-latest
+ # The Algolia admin key is stored as an environment secret, not a repo
+ # secret. Declaring the environment is what exposes `secrets.*` (and any
+ # env-scoped `vars.*`) to this job — without it the key resolves empty and
+ # the sync silently skips.
+ environment: Production
defaults:
run:
working-directory: ./docs
env:
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID || '62HI9PQZ1L' }}
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
- ALGOLIA_INDEX_NAME: ${{ vars.ALGOLIA_INDEX_NAME || 'docs_composio_dev_62hi9pqz1l_pages' }}
+ ALGOLIA_INDEX_NAME: ${{ vars.ALGOLIA_INDEX_NAME || 'docs_composio' }}
steps:
- name: Checkout repository
diff --git a/docs/CLAUDE.md b/docs/CLAUDE.md
index d51b4e343..bc15a5b23 100644
--- a/docs/CLAUDE.md
+++ b/docs/CLAUDE.md
@@ -87,9 +87,9 @@ Detailed documentation for Claude is organized in `.claude/`:
## Search
-The docs search dialog uses Algolia in production when `NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY` is configured. `NEXT_PUBLIC_ALGOLIA_APP_ID` defaults to `62HI9PQZ1L`, and `NEXT_PUBLIC_ALGOLIA_INDEX_NAME` defaults to `docs_composio_dev_62hi9pqz1l_pages`. Without a search API key it falls back to `/api/search` for local development and tests. Algolia searches request `clickAnalytics`, and the client sends search result view/click events with `search-insights`.
+The docs search dialog uses Algolia in production when `NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY` is configured. `NEXT_PUBLIC_ALGOLIA_APP_ID` defaults to `62HI9PQZ1L`, and `NEXT_PUBLIC_ALGOLIA_INDEX_NAME` defaults to `docs_composio`. Without a search API key it falls back to `/api/search` for local development and tests. Algolia searches request `clickAnalytics`, and the client sends search result view/click events with `search-insights`.
-Run `ALGOLIA_APP_ID=62HI9PQZ1L ALGOLIA_ADMIN_API_KEY=... ALGOLIA_INDEX_NAME=docs_composio_dev_62hi9pqz1l_pages bun run sync:search` from `docs/` to rebuild the Algolia index. The sync script does not use Algolia Crawler: it creates section-sized records from MDX/OpenAPI/toolkit data, configures searchable attributes, `customRanking`, and `attributeForDistinct`, then replaces the index objects. Use `bun run sync:search --dry-run --samples` to inspect generated records and `ALGOLIA_SEARCH_API_KEY=... bun run test:search "oauth auth config"` to test live relevance.
+Run `ALGOLIA_APP_ID=62HI9PQZ1L ALGOLIA_ADMIN_API_KEY=... ALGOLIA_INDEX_NAME=docs_composio bun run sync:search` from `docs/` to rebuild the Algolia index. The sync script does not use Algolia Crawler: it creates section-sized records from MDX/OpenAPI/toolkit data, configures searchable attributes, `customRanking`, and `attributeForDistinct`, then replaces the index objects. Use `bun run sync:search --dry-run --samples` to inspect generated records and `ALGOLIA_SEARCH_API_KEY=... bun run test:search "oauth auth config"` to test live relevance.
## API Versioning
diff --git a/docs/README.md b/docs/README.md
index 182775229..b1805fbdc 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -81,7 +81,7 @@ Docs search uses Algolia when `NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY` is set; other
```bash
NEXT_PUBLIC_ALGOLIA_APP_ID=62HI9PQZ1L # optional; default shown
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY=...
-NEXT_PUBLIC_ALGOLIA_INDEX_NAME=docs_composio_dev_62hi9pqz1l_pages # optional; default shown
+NEXT_PUBLIC_ALGOLIA_INDEX_NAME=docs_composio # optional; default shown
```
Sync the Algolia index with an admin key:
@@ -89,7 +89,7 @@ Sync the Algolia index with an admin key:
```bash
ALGOLIA_APP_ID=62HI9PQZ1L
ALGOLIA_ADMIN_API_KEY=...
-ALGOLIA_INDEX_NAME=docs_composio_dev_62hi9pqz1l_pages bun run sync:search
+ALGOLIA_INDEX_NAME=docs_composio bun run sync:search
```
Preview the generated records or test live relevance:
diff --git a/docs/components/custom-search-dialog.tsx b/docs/components/custom-search-dialog.tsx
index a96dad9a9..31131d8ec 100644
--- a/docs/components/custom-search-dialog.tsx
+++ b/docs/components/custom-search-dialog.tsx
@@ -127,7 +127,7 @@ export default function CustomSearchDialog({
const clientOptions = useMemo(() => {
const appId = process.env.NEXT_PUBLIC_ALGOLIA_APP_ID ?? '62HI9PQZ1L';
const searchApiKey = process.env.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY;
- const indexName = process.env.NEXT_PUBLIC_ALGOLIA_INDEX_NAME ?? 'docs_composio_dev_62hi9pqz1l_pages';
+ const indexName = process.env.NEXT_PUBLIC_ALGOLIA_INDEX_NAME ?? 'docs_composio';
if (appId && searchApiKey) {
const client = liteClient(appId, searchApiKey);
@@ -201,7 +201,7 @@ export default function CustomSearchDialog({
const url = new URL(href, window.location.origin);
const path = `${url.pathname}${url.hash}`;
const hit = algoliaHitMetaRef.current.get(path) ?? algoliaHitMetaRef.current.get(url.pathname);
- const indexName = process.env.NEXT_PUBLIC_ALGOLIA_INDEX_NAME ?? 'docs_composio_dev_62hi9pqz1l_pages';
+ const indexName = process.env.NEXT_PUBLIC_ALGOLIA_INDEX_NAME ?? 'docs_composio';
if (!hit) return;
diff --git a/docs/lib/search-index.ts b/docs/lib/search-index.ts
index 1f0511f0d..8a7026bf4 100644
--- a/docs/lib/search-index.ts
+++ b/docs/lib/search-index.ts
@@ -13,7 +13,7 @@ import { mdxToCleanMarkdown } from '@/lib/source';
import { getAllToolkitsSync } from '@/lib/toolkit-data';
export const ALGOLIA_DEFAULT_APP_ID = '62HI9PQZ1L';
-export const ALGOLIA_DEFAULT_INDEX_NAME = 'docs_composio_dev_62hi9pqz1l_pages';
+export const ALGOLIA_DEFAULT_INDEX_NAME = 'docs_composio';
const MAX_CHUNK_CHARS = 3_800;
const MAX_CHUNK_BYTES = 9_000;