Skip to content

[WIP] Orama search #2426

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

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

[WIP] Orama search #2426

wants to merge 33 commits into from

Conversation

thisisjofrank
Copy link
Collaborator

@thisisjofrank thisisjofrank commented Aug 6, 2025

Move search over to Orama

  • Generate search indexes and upload to Orama

Features:

  • Basic markdown indexing (generate_orama_index.ts)
  • Indexing of API docs (generate_orama_index_full.ts)
  • Orama Cloud client upload (upload_orama_index.ts)
  • Index analysis and quality checking (analyze_orama_index.ts)
  • Environment variable support for API credentials

Usage:

  • deno task generate:orama:full # Generate comprehensive index
  • deno task upload:orama [file] --deploy # Upload and deploy
  • deno task analyze:orama [file] # Analyze index quality

Copy link
Member

@philhawksworth philhawksworth left a comment

Choose a reason for hiding this comment

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

Looking good!

Perhaps we could have the readme note which option we are using instead of listing all the possibilities. Good to have them all listed, but stating which one we are adopting would be useful for future us.

@@ -7,7 +7,7 @@ export default function SearchInput() {
type="search"
placeholder="Search"
id="orama-search-input"
className="w-full min-w-24 rounded-lg text-sm leading-normal p-1 pl-8 border transition-all duration-150
Copy link
Contributor

Choose a reason for hiding this comment

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

Making the text normal-sized prevents iOS from zooming the input

search.client.ts Outdated
@@ -454,7 +454,7 @@ class OramaSearch {
);
return text.replace(
regex,
'<mark class="bg-runtime px-1 py-0.5 rounded text-black font-bold">$1</mark>',
Copy link
Contributor

Choose a reason for hiding this comment

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

Less padding on the sides prevents partial-word highlights from looking goofy (e.g, if the user enters "Types" and gets a hit for "TypeScript")

Copy link
Contributor

@josh-collinsworth josh-collinsworth left a comment

Choose a reason for hiding this comment

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

I think we may want to continue tweaking our algorithm, but I'm happy with this. Excellent work @thisisjofrank 👏

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.

4 participants