Skip to content

[BUG] putMapping fails with HTTP 400 on OpenSearch 3.4.0 — ES mapping format incompatibility #35305

@fabrizzio-dotCMS

Description

@fabrizzio-dotCMS

Summary

When dotCMS boots in Phase 3 (OS only), all content-type putMapping calls to OpenSearch 3.4.0 fail with HTTP 400. As a result, 0 documents are indexed in OS despite the indices being physically created.

Observed behavior

  • OS indices are created successfully at startup
  • All putMapping calls return HTTP 400 from OS
  • Working and live indices remain at 0 documents
  • GET /api/v1/esindex/ shows OS indices with health: null, docs: 0

Root cause

The mapping JSON generated by ESMappingAPIImpl / MappingHelper targets Elasticsearch 7.x format. IndexMappingRestOperationsOS (or MappingOperationsOS.putMapping()) passes this payload unchanged to OpenSearch 3.4.0, which rejects it.

Known incompatibilities between ES 7.x and OS 3.x mapping formats include:

  • _type field mappings (removed in OS 3.x)
  • include_type_name parameter handling
  • Some field type aliases

Fix

Audit the mapping JSON produced by MappingHelper / ESMappingAPIImpl.getMapping() for OS 3.4.0 compatibility. Add required format transformations in the OS-specific mapping path (IndexMappingRestOperationsOS) before submitting to OS.

Start by capturing the exact 400 response body from OS to identify which fields are being rejected.

Impact

  • Phase 3 (OS only) is completely non-functional — no content can be indexed
  • Blocks full migration validation

Discovered via

QA test run — Phase 3 boot against dotcms/dotcms:latest with single-node-os-migration stack (OS 3.4.0).

Related

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions