Skip to content

[Backport 2.19] Fix map_unmapped_fields_as_text lost after dynamic mapping update#21309

Open
opensearch-trigger-bot[bot] wants to merge 2 commits into2.19from
backport/backport-21301-to-2.19
Open

[Backport 2.19] Fix map_unmapped_fields_as_text lost after dynamic mapping update#21309
opensearch-trigger-bot[bot] wants to merge 2 commits into2.19from
backport/backport-21301-to-2.19

Conversation

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

Backport 7c40edb from #21301.

…1301)

When a dynamic mapping update triggers a mapping merge, the
PercolatorFieldMapper is rebuilt via ParametrizedFieldMapper.merge()
which passes Settings.EMPTY to BuilderContext. The Builder read
map_unmapped_fields_as_text from these empty settings, reverting it
to the default value of false.

Preserve the setting value through merges by passing it from the
existing mapper into the new Builder instance.

Closes #21072

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 7c40edb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot opensearch-trigger-bot Bot requested a review from a team as a code owner April 21, 2026 14:38
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 7bc1ad0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

…s on 2.19

The createIndexWithSimpleMappings method does not exist on the 2.19 branch.
Use the existing createIndex(String, Settings, String, String...) method
instead, which takes the type name as the third argument.

Signed-off-by: Andrew Ross <[email protected]>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for c00074c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❕ Gradle check result for c00074c: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.06%. Comparing base (aff3489) to head (c00074c).
⚠️ Report is 2 commits behind head on 2.19.

Additional details and impacted files
@@             Coverage Diff              @@
##               2.19   #21309      +/-   ##
============================================
+ Coverage     71.92%   72.06%   +0.13%     
+ Complexity    66009    64508    -1501     
============================================
  Files          5342     5122     -220     
  Lines        307392   300239    -7153     
  Branches      44862    44091     -771     
============================================
- Hits         221105   216362    -4743     
+ Misses        67823    65766    -2057     
+ Partials      18464    18111     -353     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant