Skip to content

feat(ContentSearch): add async search support via useSearchCollection#6432

Draft
benjamincanac wants to merge 19 commits into
v4from
feat/content-search-fts5
Draft

feat(ContentSearch): add async search support via useSearchCollection#6432
benjamincanac wants to merge 19 commits into
v4from
feat/content-search-fts5

Conversation

@benjamincanac
Copy link
Copy Markdown
Member

@benjamincanac benjamincanac commented May 7, 2026

🔗 Linked issue

Follows up on nuxt/content#3787

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 7, 2026

npm i https://pkg.pr.new/@nuxt/ui@6432

commit: 0a6c3fc

Without this, the async `search()` call received `undefined` as limit
because ContentSearch's own fuse defaults didn't include `resultLimit`.
CommandPalette's internal default of 12 only applies to its own Fuse
filtering path and doesn't flow back up.
…h` change

- Add `searchStatus` prop to re-run search when index becomes ready
  (handles paste-before-index-init case)
- Watch `props.search` reference to refresh results when the FTS index
  is rebuilt (e.g. collection switch on nuxt.com)
- Update docs with `useSearchCollection` example
- Update test snapshots
@benjamincanac benjamincanac changed the title feat(ContentSearch): add search function prop for external providers feat(ContentSearch): add async search support via useSearchCollection May 9, 2026
# Conflicts:
#	src/runtime/components/content/ContentSearch.vue
…ean up

- Add `descriptionHtml` to the `omit()` list in ListboxItem value binding
  (consistent with `labelHtml` / `suffixHtml`)
- Remove unused `searching` ref in ContentSearch
- Fix `mapSearchResult` return type (never returns null)
- Refactor `mapSearchResult` into batch `mapSearchResults` with a nav
  cache so multiple sections from the same page share one tree walk
- Disable `useTokenSearch` in docs Search since FTS5 handles
  tokenization server-side
- Rename prose component titles to `Prose{Name}` with
  `navigation.title` so they don't collide with regular components
  in search results
@socket-security
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant