Search Types
Fumadocs offers two search index types:Simple Search
Best for basic documentation sites. Searches across page titles, descriptions, and content.Advanced Search
Provides structured search with heading detection and better relevance. Requires structured data from MDX content.Built-in Search (Orama)
Fumadocs includes built-in search powered by Orama, a fast in-memory search engine.Server Setup
Create a search API endpoint:app/api/search/route.ts
Client Setup
Use theuseDocsSearch hook:
components/search.tsx
Static Search
For static site generation, export search indexes and load them on the client:app/api/search/route.ts
Algolia Integration
Sync Documents
Sync your documents to Algolia:scripts/sync-search.ts
Client Implementation
Custom Search Handler
Orama Cloud Integration
Sync to Orama Cloud
scripts/sync-orama.ts
I18n Support
Client Usage
I18n Search
Create search indexes for multiple languages:app/api/search/route.ts
Tag Filtering
Filter search results by tags:tag field in your indexes.