Skip to content

feat(plugin-orama): add Orama search plugin - #841

Open
Mister-Hope wants to merge 12 commits into
mainfrom
feat/plugin-orama
Open

feat(plugin-orama): add Orama search plugin#841
Mister-Hope wants to merge 12 commits into
mainfrom
feat/plugin-orama

Conversation

@Mister-Hope

Copy link
Copy Markdown
Member

Description

Add a new official search plugin @vuepress/plugin-orama, powered by Orama, mirroring the architecture of @vuepress/plugin-slimsearch.

It provides the same client-side search experience (search modal, suggestions, query/result history, custom fields, full-text indexing) backed by the Orama full-text engine.

Features

  • Full-text and CJK search via a custom Intl.Segmenter-based tokenizer, consistent between index building and search
  • Per-locale index with worker-based search in both dev and build mode
  • Custom fields, indexContent, preserveTags, filter, sortStrategy options (parity with slimsearch)
  • Configurable tokenizer per locale via indexOptions / indexLocaleOptions
  • Search suggestions (implemented on top of Orama's prefix matching)
  • Query / result history, hotkeys, and keyboard navigation
  • Docs (EN + ZH) and unit tests

Notes

  • indexOptions / indexLocaleOptions accept a tokenizer factory instead of slimsearch's tokenize / processTerm, since Orama uses a schema-based tokenizer component.
  • The id field is excluded from searchable properties to avoid spurious matches; threshold: 0 (AND semantics) matches slimsearch's default.

Comment thread plugins/search/plugin-orama/src/worker/dev.ts Fixed
Comment thread plugins/search/plugin-orama/src/worker/dev.ts Dismissed
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.

2 participants