Skip to content

docs(elasticsearch): document field name mapping - #2349

Merged
soyuka merged 2 commits into
api-platform:4.4from
soyuka:docs/elasticsearch-name-converter-8470
Sep 30, 2026
Merged

soyuka merged 2 commits into
api-platform:4.4from
soyuka:docs/elasticsearch-name-converter-8470

Conversation

@soyuka

@soyuka soyuka commented Sep 29, 2026

Copy link
Copy Markdown
Member

Fixes api-platform/core#8470

The page said that snake_case document fields are converted to camelCase properties automatically. That has not been true since core v2.4.3 (api-platform/core@f8bd599b0): with no configuration, field names are not converted. It also contradicted the "use camelCase" rule earlier on the same page.

This PR removes the claim and adds a "Mapping Field Names" section. It documents the two ways to map snake_case documents: the global name_converter option, or an Elasticsearch-only override of api_platform.elasticsearch.name_converter.inner_fields. It also warns that the converter renames the fields used by filters and sorting.

@soyuka
soyuka merged commit 588a90a into api-platform:4.4 Sep 30, 2026
3 checks passed
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