-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat(search): use new Orama components #8175
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(search): use new Orama components #8175
Conversation
Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
| import { ChatInput } from '../ChatInput'; | ||
| import { ChatInteractionsContainer } from '../ChatInteractions'; | ||
| import { Footer } from '../Footer'; | ||
| import styles from './index.module.css'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: style imports after all others
| import { DEFAULT_ORAMA_QUERY_PARAMS } from '#site/next.constants.mjs'; | ||
| import { useSearchbox } from '#site/providers/searchboxProvider'; | ||
|
|
||
| import styles from './index.module.css'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: style imports after all others
| import { MagnifyingGlassIcon } from '@heroicons/react/24/solid'; | ||
| import { SearchInput } from '@orama/ui/components'; | ||
| import { useTranslations } from 'next-intl'; | ||
| import { type FC, type PropsWithChildren } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit: this can be a type import
| import { type FC, type PropsWithChildren } from 'react'; | |
| import type { FC, PropsWithChildren } from 'react'; |
| import { SearchResults } from '@orama/ui/components'; | ||
| import { useReducer, type FC } from 'react'; | ||
|
|
||
| import searchboxReducer, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: simplify this to just seachReducer, searchState
| import { DEFAULT_ORAMA_QUERY_PARAMS } from '#site/next.constants.mjs'; | ||
| import { useSearchbox } from '#site/providers/searchboxProvider'; | ||
|
|
||
| import styles from './index.module.css'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: style iports after all others
| import type { FC, PropsWithChildren } from 'react'; | ||
|
|
||
| import { ChatInput } from '../ChatInput'; | ||
| import styles from './index.module.css'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: style imports after all others
| @@ -0,0 +1,54 @@ | |||
| import type { Dispatch } from 'react'; | |||
|
|
|||
| import type * as Types from '#site/types/searchbox'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @nodejs/nodejs-website do we use to do wildcard imports of types?
ovflowd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM! I left a few final comment reviews that I'd appreciate to get answered still in this PR, but I believe this PR isn't anymore in a blocked state and ultimately "could" get merged as is.
@nodejs/nodejs-website, team keep me humble. Can y'all also give a final round of reviews here and help me out?
And finally for the Orama team. Thank you so so much for your patience and for the incredible work done here. Really appreciate it!!!!
|
(Also, thank you @g-francesca for your patience 🙇) |
With pleasure 🤗 . Thank you too for the time spent improving this PR. I'm addressing the latest comments rn. |
|
Sorry if this was already discussed (200+ hidden items 😅) but I'm a bit worried about how relevant items are sorted in the search. For example: Under learn we have the However, in the preview Docs are listed before Learn but even if I select "Learn" articles, the main article is buried deep Another example, ABI Stability sub content being sorted above the main article called "ABI Stability"
|
|
@efekrskl we can tweak the search result ranking using BM25F field boosting (https://docs.orama.com/docs/cloud/performing-search/search-modes/full-text-search#field-boosting). We should gather a few example and work on the configuration until the results matches the expectations |
bjohansebas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
|
thoughts on these CI failures? edit: as far as I can tell, it's flakey problems with doc-kit and the linting, which we encountered elsewhere too |
|
merging - this has requisite approvals and has been floating long enough. let's iterate on what needs work, move to orama's new tech, and celebrate ! |



This PR supersedes #7971 and integrates the new Orama components, powered by the new OramaCore backend.
Description
New components - React-based to replace the old WebComponents-based ones. New backend (OramaCore instead of old Orama Cloud), all hosted and maintained on https://app.orama.com. Credentials have been shared privately with the repository maintainers on Slack.
Validation
Tested locally and on remote demo environment.
Related Issues
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.