Skip to content

Conversation

@jordan-powers
Copy link
Contributor

@jordan-powers jordan-powers commented Sep 10, 2025

This PR is the first step to gate the storage savings of the patterned_text field mapper behind an enterprise license.

A new index setting index.mapping.patterned_text.disable_templating is set on index creation if the current license does not support the patterned text enterprise-level storage savings.

This index setting is then used to set the parameter disable_templating on the patterned text mapper.

@jordan-powers jordan-powers changed the title Patterned text licensing Add disable_enterprise index setting and mapping parameter to patterned_text Sep 11, 2025
@jordan-powers jordan-powers added the test-release Trigger CI checks against release build label Sep 11, 2025
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.

This looks in the right direction. I left a few comments.

"index.mapping.patterned_text_disable_enterprise",
false,
Setting.Property.IndexScope,
Setting.Property.InternalIndex
Copy link
Member

Choose a reason for hiding this comment

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

Should this be PrivateIndex? I think right now this isn't possible ,however #133789 just got merged, that should allow this.

* no valid enterprise license.
*/
public static final Setting<Boolean> PATTERNED_TEXT_BASIC_SETTING = Setting.boolSetting(
"index.mapping.patterned_text_disable_enterprise",
Copy link
Member

Choose a reason for hiding this comment

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

Maybe rename this to index.mapping.patterned_text.disable_templating? So this looks less license oriented and more of a flag to disable a functionality.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, I wasn't happy with that name, I just couldn't think of anything better at the moment. patterned_text.disable_templating sounds good to me

@jordan-powers jordan-powers changed the title Add disable_enterprise index setting and mapping parameter to patterned_text Add disable_templating index setting/mapping parameter to patterned_text Sep 12, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@jordan-powers
Copy link
Contributor Author

Failing release tests are known issues being addressed in other PRs:

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, thanks @jordan-powers!

@jordan-powers jordan-powers enabled auto-merge (squash) September 16, 2025 17:46
@jordan-powers
Copy link
Contributor Author

The only failing test is an unrelated known issue (#134640), so I'll merge anyway.

@jordan-powers jordan-powers merged commit 0a3247d into elastic:main Sep 16, 2025
34 of 37 checks passed
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Sep 17, 2025
…ext (elastic#134466)

This patch is the first step to gate the storage savings of the
patterned_text field mapper behind an enterprise license.

A new index setting ``index.mapping.patterned_text.disable_templating` is
set on index creation if the current license does not support the patterned
text enterprise-level storage savings.

This index setting is then used to set the parameter disable_templating on
the patterned text mapper.
jordan-powers added a commit that referenced this pull request Sep 17, 2025
Follow-up to #134466 to actually check the disable_templating parameter in
the patterned_text mapper. When the parameter is set, values will be stored
as-is in a stored field.
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
…ext (elastic#134466)

This patch is the first step to gate the storage savings of the
patterned_text field mapper behind an enterprise license.

A new index setting ``index.mapping.patterned_text.disable_templating` is
set on index creation if the current license does not support the patterned
text enterprise-level storage savings.

This index setting is then used to set the parameter disable_templating on
the patterned text mapper.
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
Follow-up to elastic#134466 to actually check the disable_templating parameter in
the patterned_text mapper. When the parameter is set, values will be stored
as-is in a stored field.
@jordan-powers jordan-powers deleted the patterned-text-licensing branch October 1, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :StorageEngine/Logs You know, for Logs Team:StorageEngine test-release Trigger CI checks against release build v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants