Skip to content

Spec drift: update for elasticsearch#152361 (new nullability sub-parameter for doc_values mapping) #6400

Description

@github-actions

Summary

Elasticsearch PR #152361"Added nullability doc_values mapping parameter" — adds a nullability boolean sub-parameter to the doc_values mapping object and a corresponding index-level setting index.mapping.doc_values.nullability.

Field Value
ES PR elastic/elasticsearch#152361
Author @Kubik42
Merge commit b362d0d0faf7cd3d4c86099fb3fe992c0dec7b43
Merged 2026-07-03
ES version labels v9.5.0
Implied spec branches main (backport to 9.5 once released)

API impact

doc_values mapping parameter extended

The doc_values field in index mappings can now be specified as an object with a nullability sub-parameter (in addition to the existing plain-boolean form):

{
  "properties": {
    "host": {
      "type": "keyword",
      "doc_values": { "nullability": false }
    }
  }
}

When nullability: false, every document must supply a non-null value for the field; omission, explicit null, empty arrays, or all-null arrays are all rejected at index time with a parse error.

The nullability field defaults to true (no-op, matches current behavior).

New index-level setting

index.mapping.doc_values.nullability: false makes every field in the index required unless a specific field overrides it with doc_values: { "nullability": true }.


Relationship to open PR #6391

There is already an open spec PR #6391 that introduces a DocValuesConfig union type to cover doc_values.multi_value (from elasticsearch#148454). That PR changes doc_values from boolean to boolean | DocValuesConfig.

This PR (nullability) adds a second sub-parameter to the same DocValuesConfig object. The two changes should be coordinated: whichever lands first sets the structure, and the second adds to it. It may be simplest to handle them in a single pass.


Specification files to edit

  1. specification/_types/mapping/core.tsdoc_values?: boolean needs to become doc_values?: boolean | DocValuesConfig (or DocValuesConfig extended if PR Add doc_values.multi_value config for mapping properties #6391 has already landed).
  2. specification/_types/mapping/complex.ts — same change as core.ts.
  3. specification/_types/mapping/ (new or existing type file) — define or extend DocValuesConfig to include nullability?: boolean alongside the multi_value field from PR Add doc_values.multi_value config for mapping properties #6391.

Notes / questions for the triager

  • Coordinate with open PR Add doc_values.multi_value config for mapping properties #6391 which introduces DocValuesConfig for multi_value. Both changes affect the same type; merging them avoids churn.
  • The PR has the test-release label, suggesting nullability may have been behind a feature flag previously. Verify whether an @availability annotation (e.g. since=9.5.0) or a feature-flag guard is needed.
  • Consider assigning the original ES PR author @Kubik42.

Generated by Weekly Elasticsearch Specification Drift · ● 4.1M ·

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions