Skip to content

Patterned text conditionally disable templating#134744

Merged
jordan-powers merged 4 commits intoelastic:mainfrom
jordan-powers:patterned-text-conditionally-disable-templating
Sep 17, 2025
Merged

Patterned text conditionally disable templating#134744
jordan-powers merged 4 commits intoelastic:mainfrom
jordan-powers:patterned-text-conditionally-disable-templating

Conversation

@jordan-powers
Copy link
Contributor

@jordan-powers jordan-powers commented Sep 15, 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.

@jordan-powers jordan-powers added >non-issue :StorageEngine/Logs You know, for Logs v9.2.0 test-release Trigger CI checks against release build and removed v9.2.0 labels Sep 15, 2025
@jordan-powers jordan-powers force-pushed the patterned-text-conditionally-disable-templating branch from 2ba4ae4 to daec41c Compare September 16, 2025 19:21
@jordan-powers jordan-powers marked this pull request as ready for review September 16, 2025 19:24
@elasticsearchmachine
Copy link
Collaborator

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

try (var searcher = indexService.getShard(0).acquireSearcher(INDEX)) {
try (var indexReader = searcher.getIndexReader()) {
var document = indexReader.storedFields().document(0);
assertNull(document.getField("field_patterned_text.stored"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: ^ maybe update the above comment to "assert only contains stored field if templating is disabled"

Copy link
Contributor

@parkertimmins parkertimmins left a comment

Choose a reason for hiding this comment

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

Looks correct to me. I like the parameter factory testing stuff 👍

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 👍

@jordan-powers jordan-powers merged commit 51ad36a into elastic:main Sep 17, 2025
36 checks passed
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-conditionally-disable-templating 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.

4 participants