Skip to content

fix(core): search all text fields in search all - #8089

Open
sap1110 wants to merge 1 commit into
decaporg:mainfrom
sap1110:8088-search-all-fields
Open

sap1110 wants to merge 1 commit into
decaporg:mainfrom
sap1110:8088-search-all-fields

Conversation

@sap1110

@sap1110 sap1110 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Search all only looked at the title/author/summary fields for folder collections, and for file collections lists and objects got turned into "[object Object]", so a lot of text just never showed up in results.

The fuzzy search on those fields is still there and still decides the ranking. On top of that, entries that weren't picked up get a plain case-insensitive substring check over all their string values (going into lists and objects too), and those show up after the ranked ones. I went with a substring check here instead of fuzzy since fuzzy over long text matches pretty much anything. Folder entry body is still skipped unless the backend searches body itself, same as now.

fixes #8088

Test plan

  • Added a test in backend.spec.js for a folder entry with the term in a non-title field and a file entry with the term inside a list of objects. It fails on main and passes with the change.
  • pnpm run test:unit, pnpm run lint-quiet and pnpm run type-check all pass locally.

Checklist

Search all only looked at the inferred title, short title and author plus
the summary fields of folder collections, and stringified the top-level
fields of file collections, so text in any other field or inside a list or
object was never found. Entries are now also matched when any string or
number in their data contains the term, after the ranked fuzzy matches.
The body stays excluded on backends that do not search it.

Fixes decaporg#8088
@sap1110
sap1110 requested a review from a team as a code owner November 19, 2026 09:21
@netlify

netlify Bot commented Nov 19, 2026

Copy link
Copy Markdown

👷 Deploy request for decap-cms pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit be3e242

This branch has not been deployed

No deployments
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.

"Search all" misses text in most fields: folder collections search only title/summary fields, file collections stringify lists to "[object Object]"

1 participant