This repository was archived by the owner on Oct 27, 2026. It is now read-only.
Repository navigation
Replace Algolia with Fumadocs built-in search - #1255
Draft
sdserranog wants to merge 6 commits into
Draft
sdserranog wants to merge 6 commits into
sdserranog wants to merge 6 commits into
Conversation
Adds /en/search-compare, which runs the same query against Algolia and Fumadocs' built-in search (ZBSearch) side by side. The live search dialog still uses Algolia. Not meant to merge.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Search now uses Fumadocs' search dialog backed by /api/search. Remove the Algolia component, crawler config, sync and reindex workflows, env vars, and the algoliasearch and react-instantsearch dependencies.
Index URL slugs (and toolkit ids) as boosted keywords so "faq" and "on prem" find pages whose titles use different words. Add a CDN Cache-Control header to /api/search and a test for the main ranking cases.
- Show suggested pages while the search input is empty. - Send PostHog events for settled searches and selected results, replacing the analytics lost with Algolia. - Show Ctrl instead of the Mac command key on Windows and Linux, using Fumadocs' hotkey config. - Cut /api/search queries to 200 characters instead of rejecting them.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2121910. Configure here.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What this does
Switches the docs search from Algolia to Fumadocs' built-in search, after the team liked it in the comparison (demo kept in #1257).
/api/searchNEXT_PUBLIC_ALGOLIA_*env varsalgoliasearchandreact-instantsearchdependencies/api/searchresponses on the CDN, and cuts queries to 200 characters/en/search-comparedemo page (it lives on in Demo: compare Algolia with Fumadocs built-in search #1257)CLAUDE.mdandtoolkit-docs-generator/ARCHITECTURE.mdThe search index (page content plus toolkit pages) and tuning (typo tolerance, stemming, title boost) are the same as in the comparison. Results come from the comparison in #1257: roughly a tie with Algolia, better on integrations, a bit worse on typos.
Things to know
Docs searchevent (query, result count) once the user pauses typing, andDocs search result selectedALGOLIA_CRAWLER_*secrets and variables in repo settings can be deleted, and the Algolia crawler can be turned offTesting
bun run typecheck, lint, andbun run testpass/api/searchreturns the right pages forapi key,gmial,Gmail.SendEmailandon premNote
Medium Risk
Docs search is a user-facing surface with new indexing, caching, and analytics behavior; results are page-level rather than section-level, which may change discoverability compared to Algolia.
Overview
Replaces Algolia docs search with Fumadocs’ built-in search served from a new
/api/searchroute. The navbar and mobile menu use aSearchButtonthat opens a lazy-loadedsearch-dialogwired throughAppRootProvider, with empty-state suggestions fromSEARCH_SUGGESTIONS.Indexing and behavior:
lib/builtin-search.tsbuilds the index at request time from MDX pages (via Fumadocs source) and generated toolkit JSON (tool names/descriptions), with English stemming, typo tolerance, and title/URL keyword boosting. The API route adds CDN cache headers and truncates queries to 200 characters.search-dialogadds PostHog events for settled queries and result clicks.Removed: Algolia crawler config and docs,
algolia-reindex/sync-crawler-configworkflows,sync-crawler-configscript,NEXT_PUBLIC_ALGOLIA_*env vars, andalgoliasearch/react-instantsearchdependencies.tests/builtin-search.test.tscovers ranking, suggestions, caching, and long-query handling.Reviewed by Cursor Bugbot for commit 5397117. Bugbot is set up for automated code reviews on this repo. Configure here.