Repository navigation
Conversation
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
👷 Deploy request for decap-cms pending review.Visit the deploys page to approve it
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
backend.spec.jsfor 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-quietandpnpm run type-checkall pass locally.Checklist