Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to better local-search based on Pagefind #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yujonglee
Copy link

@yujonglee yujonglee commented Jul 30, 2024

I couldn't get related pages with the current search bar of docs.mistral.ai, even for simple queries.

Screenshot 2024-07-30 at 2 06 00 PM Screenshot 2024-07-30 at 2 05 27 PM

The problem is the underlying local search index called Lunr. I agree that local search can be enough for the current size of docs, but Lunr hasn't been updated for the last 4 years and there's a better alternative called Pagefind.

After the switch from Lunr to Pagefind, I found the search results got way better.

Screenshot 2024-07-30 at 2 06 52 PM Screenshot 2024-07-30 at 2 07 23 PM

To try locally:

npx pnpm@8 i && npx docusaurus build && npx docusaurus serve

All source code related to search index and UI is MIT licensed. For UI customization, there's documentation too.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@getcanary/web@0.0.64 None 0 367 kB yujonglee

View full report↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant