Skip to content

Conversation

jordan-powers
Copy link
Contributor

This PR adds an index setting index.mapping.field_name_length.ignore_dynamic_beyond_limit. When this setting is set, fields dynamically added to the mapping that would violate the index.mapping.field_name_length.limit are silently ignored instead of causing an exception and preventing indexing of the document.

Fixes #135700

@elasticsearchmachine
Copy link
Collaborator

Hi @jordan-powers, I've created a changelog YAML for you.

Copy link
Contributor

github-actions bot commented Oct 7, 2025

🔍 Preview links for changed docs

Copy link
Contributor

github-actions bot commented Oct 7, 2025

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@jordan-powers jordan-powers marked this pull request as ready for review October 9, 2025 16:47
@jordan-powers jordan-powers requested a review from a team as a code owner October 9, 2025 16:47
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍


---

"Test field name length limit":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add a test where the field will not be ignored? Or update these tests to add two fields, one field that would be ignored because field name length is exceeded and one field just under this limit?

);
public static final Setting<Boolean> INDEX_MAPPING_IGNORE_DYNAMIC_BEYOND_FIELD_NAME_LENGTH_SETTING = Setting.boolSetting(
"index.mapping.field_name_length.ignore_dynamic_beyond_limit",
false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a follow up change we can consider defaulting to true in case of logsdb and tsdb?

@jordan-powers jordan-powers enabled auto-merge (squash) October 13, 2025 15:22
@jordan-powers jordan-powers merged commit 242460f into elastic:main Oct 13, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deal more gracefully when index.mapping.field_name_length.limit is exceeded.

3 participants