rspress-plugin-typesense new
This plugin replaces Rspress's built-in search with Typesense, an open-source, typo-tolerant search engine.
The plugin automatically indexes your documentation during the build process (rspress build) and provides a highly-optimized search experience with support for Rspress multi-versioning and internationalization.
This is a community-maintained integration.
Installation
Usage
1. Start typesense server
You can either self-host the Typesense server or use their cloud service. Follow their getting started guide to set up your server and obtain the API key and server URL.
2. Configure the plugin
First, add the plugin to your rspress.config.ts. You must provide your Typesense server details and an API key with write permissions so the plugin can create collections and index your documents during the build.
3. Override the search component
Next, override Rspress's default Search component via a Custom Theme.
Provide a Search-Only API Key here. For security reasons, never expose your Admin API Key in the frontend.
4. Build and index
Run the build command to generate your site and index your content into Typesense.
All set! You've successfully integrated typo-tolerant search into your documentation. The plugin automatically handles filtering based on the user's current language and version.
For more advanced configuration and usage, refer to the plugin README.