Skip to content

docs(v30): clarify required non-indexed fields are now type-validated#470

Open
alangmartini wants to merge 1 commit intotypesense:masterfrom
alangmartini:docs/v30-clarify-non-indexed-field-validation-change
Open

docs(v30): clarify required non-indexed fields are now type-validated#470
alangmartini wants to merge 1 commit intotypesense:masterfrom
alangmartini:docs/v30-clarify-non-indexed-field-validation-change

Conversation

@alangmartini
Copy link
Copy Markdown
Contributor

Summary

In v30.0+ the skip-validation gate for index: false tightened to also require optional: true. Required non-indexed fields are now type-validated on write, which can cause imports that previously succeeded under v29.x to return 400 Field 'X' has an incorrect type errors after upgrading.

The existing v30 release notes call this out as an enhancement (Allow non-indexed nested fields to still be marked as required.), but they don't explain the implication for users with legacy schemas. This PR adds the necessary context.

Changes

  • docs-site/content/30.{0,1,2}/api/README.md: Expand the existing enhancement bullet to point to the behavior changes section, and add a new entry in Deprecations / behavior changes explaining the validation tightening, the symptom users will hit on upgrade, and the two recommended fixes (set optional: true, or change the field type to match the data shape).
  • docs-site/content/30.{0,1,2}/api/collections.md: Replace the outdated note it is not currently possible to have a mandatory field excluded from the indexing in the Indexing all but some fields section with a :::warning block that accurately describes the v30+ behavior.

Background

Came up via a customer support thread: a v29.0.rc25 → v30.2 upgrade started failing imports for a field declared as {"type": "object", "index": false, "optional": false} with array-shaped data. The runtime change is at src/field.cpp::flatten_doc:744, which now skips validation only when both !index and optional. Confirmed with a side-by-side reproducer across v27.0 / v28.0 / v29.0.rc25 / v30.2.

Test plan

  • Skim the rendered Markdown for the three v30.x version pages to confirm the warning block renders correctly.
  • Verify the link #indexing-all-but-some-fields resolves on the published docs site for each version.

In v30.0+ the skip-validation gate for `index: false` tightened to also
require `optional: true`. Required non-indexed fields are now type
validated on write, which can cause imports that previously succeeded
under v29.x to return 400 errors after upgrading.

Updates the v30.0/30.1/30.2 release notes (Deprecations / behavior
changes) and the "Indexing all but some fields" section in collections.md
to spell out the new constraint and the recommended fixes (set the field
optional, or change the type to match the data shape).
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.

1 participant