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

feat: orama search #1131

Merged
merged 36 commits into from
Nov 7, 2024
Merged

feat: orama search #1131

merged 36 commits into from
Nov 7, 2024

Conversation

crutchcorn
Copy link
Member

@crutchcorn crutchcorn commented Aug 22, 2024

This PR replaces our in-house Fuse.js powered search with one from Orama to make our results much better.

#sponsored (disclosure to follow soon)

TODOs

  • Add author name/handles (object arrays not supported in indexes yet in Orama)
  • Add titles of chapters in collections array (string[])
  • * search for all results

Deployment

  • Merge this PR
  • Update the Remote JSON urls in Orama to point to prod
  • Update the blog post date

Copy link

vercel bot commented Aug 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
playfulprogramming ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 7:03am

Copy link
Member Author

@crutchcorn crutchcorn left a comment

Choose a reason for hiding this comment

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

@fennifith suggested a few small changes. We also need to add Orama to our sponsors list here:

https://playfulprogramming-git-orama-search-oceanbit.vercel.app/join-us

src/views/search/components/search-footer.tsx Outdated Show resolved Hide resolved
src/views/search/orama.tsx Outdated Show resolved Hide resolved

export async function searchForTerm({ postClient, collectionClient }: SearchContext, query: SearchQuery, signal: AbortSignal) {
// Schema should be passed to `search` method when:
// https://github.com/askorama/oramacloud-client-javascript/pull/35
Copy link
Member Author

Choose a reason for hiding this comment

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

This was merged. We can change this now

Copy link
Member

Choose a reason for hiding this comment

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

This doesn't appear to be working. I'm only seeing this function in the type definitions, and not the version with generics (using the latest version):

search(query: ClientSearchParams, config?: SearchConfig): Promise<Nullable<Results<AnyDocument>>>;

I'll update this comment & the client lib version, but will look into what's happening with the types later. (I don't think it should block this PR)

@PrattiDev PrattiDev merged commit 170a41e into main Nov 7, 2024
5 checks passed
@PrattiDev PrattiDev deleted the orama-search branch November 7, 2024 20:49
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.

3 participants