Skip to main content

One post tagged with "DocSearch"

Algolia DocSearchのセットアップやカスタマイズに関する記事。

View all tags

How to Optimize Algolia Search by Language on a Docusaurus Multi-language Site

· 6 min read
hiroaki
Individual Developer

When implementing Algolia DocSearch on a multi-language (i18n) site built with Docusaurus, I faced the challenge of search results containing mixed languages. It's common for situations to arise that harm the user experience, such as English pages appearing in search results when searching in Japanese.

This article organizes the specific setup steps as a technical memo to solve this problem and achieve an optimal search experience that syncs with the site's display language.

What you can achieve with this article
  • Filter search results to match the site's display language (Japanese/English).
  • Automatically route content to language-specific Algolia indexes based on the URL path (/ or /en/).
  • Improve search accuracy with index settings tailored to the characteristics of each language, such as Japanese and English.