Skip to content

Conversation

@smith558
Copy link
Contributor

@smith558 smith558 commented Dec 8, 2025

Description

  • Issue: Orama search returned no results on /docs because the Orama Docusaurus plugin passed the Docusaurus v3 version object straight into searchParams.where.version, which expects a string, so the filter never matched.
  • Cause: a bug in @orama/plugin-docusaurus-v3, it assumes useVersions() returns a string; Docusaurus v3 returns version objects.
  • Fix: Applied a small patch-package diff to coerce the version object to its .name (with sensible fallbacks) before building the search filter. Added patch-package + postinstall to keep the patch applied, documented it in patches/README.md, and removed the previous local SearchBar swizzle (initial fix version).

Notes

image

Related Issues

#348
fastify/fastify#6390

Check List

  • I have read the Contributing Guidelines (./CONTRIBUTING.md)

@smith558

This comment was marked as resolved.

Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know the offending issue?
Why do we need a wrapper now?

@smith558
Copy link
Contributor Author

smith558 commented Dec 12, 2025

Do we know the offending issue? Why do we need a wrapper now?

The issue is that the Orama plugin assumes useVersions() (from @docusaurus/plugin-content-docs/client) returns a string, but in Docusaurus v3, it returns version objects. It forwards that object into searchParams.where.version (in OramaSearchBox), and therefore the query never matches. This is an Orama bug.

@smith558
Copy link
Contributor Author

smith558 commented Dec 12, 2025

@Eomm I've reworked this. This fix is much better now. Tested locally as much as possible.

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.

Website search function doesn't return any results

2 participants