Mixedbread
Integrate Mixedbread Search with Fumadocs
Introduction
The Mixedbread Integration uses vector search to provide semantic search capabilities for your documentation. It indexes your documentation content into a vector store, enabling users to search using natural language queries and find relevant content based on meaning rather than just keyword matching.
Setup
Get your API Key
- Sign up at Mixedbread
- Navigate to API Keys
- Create a new API key and store it in your environment variables
Create a Vector Store
To sync your documentation, you'll need to create a vector store:
- Go to the Vector Stores in your Mixedbread dashboard
- Create a new vector store for your documentation
- Copy the vector store ID
Sync Documentation
Use the Mixedbread CLI to sync your documentation:
Install the CLI:
npm install @mixedbread/cli -D
Configure authentication and sync your documentation:
# Configure authentication
mxbai config keys add YOUR_API_KEY
# Sync your documentation
mxbai vs sync YOUR_VECTOR_STORE_ID "./content/docs"
The CLI will automatically detect changes in your documentation and update the vector store accordingly.
Workflow
You can automatically sync your documentation by adding a sync script to your package.json
:
{
"scripts": {
"build": "next build && npm run sync-content",
"sync-content": "mxbai vs sync YOUR_VECTOR_STORE_ID './content/docs' --ci"
}
}
Options
Tag Filter
To filter search results by tags, add a tag field to your document metadata:
---
title: Mixedbread
description: Integrate Mixedbread Search with Fumadocs
url: /docs/headless/search/mixedbread
tag: docs
---
...
And update your search client:
-
Fumadocs UI: Enable Tag Filter on Search UI.
-
Search Client: You can add the tag filter like:
import { useDocsSearch } from 'fumadocs-core/search/client'; const { search, setSearch, query } = useDocsSearch({ tag: '<your tag value>', // ... });
This allows you to scope searches to specific sections of your documentation.
How is this guide?
Last updated on