Skip to content

fix(content): search searchable custom fields#2191

Open
logelog wants to merge 1 commit into
emdash-cms:mainfrom
logelog:feat/content-list-searchable-fields
Open

fix(content): search searchable custom fields#2191
logelog wants to merge 1 commit into
emdash-cms:mainfrom
logelog:feat/content-list-searchable-fields

Conversation

@logelog

@logelog logelog commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Content-list search now includes every schema field marked searchable, in addition to the collection display fields and slug.

The FTS path already indexed searchable custom fields, but the fallback path only matched slug, title, and name. That made custom metadata search backend-dependent and prevented values such as internal ticket numbers from being found when FTS could not serve the query.

This change keeps the existing FTS path, resolves searchable fields from the collection schema, and casts fallback values to text so scalar custom fields can be matched consistently across supported SQL dialects.

Addresses the search portion of #2179.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). No user-visible strings were added.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: N/A (bug fix)

Screenshots / test output

  • pnpm --filter emdash test --run tests/integration/content/content-list-search.test.ts tests/integration/content/content-list-search-fts.test.ts (17 tests passed)
  • pnpm typecheck
  • pnpm lint
  • pnpm format:check

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d5706ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/plugin-mcp-smoke Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/admin Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@2191

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@2191

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@2191

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@2191

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@2191

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@2191

emdash

npm i https://pkg.pr.new/emdash@2191

create-emdash

npm i https://pkg.pr.new/create-emdash@2191

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@2191

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@2191

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@2191

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@2191

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@2191

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@2191

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@2191

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@2191

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@2191

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@2191

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@2191

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@2191

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@2191

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@2191

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@2191

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@2191

commit: d5706ce

@logelog
logelog force-pushed the feat/content-list-searchable-fields branch from 97a4de1 to be1120f Compare July 22, 2026 09:20
github-actions Bot pushed a commit that referenced this pull request Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Overlapping PRs

This PR modifies files that are also changed by other open PRs:

This may cause merge conflicts or duplicated work. A maintainer will coordinate.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant