Skip to content

Conversation

@mishail
Copy link
Contributor

@mishail mishail commented Jul 8, 2025

Description

There are 9 types of fields that support setting of ignore_malformed property, see the table below.

The current logic checks for the index level FieldMapper.IGNORE_MALFORMED_SETTING in catch section in parse(ParseContext context) in the FieldMapper class. The current implementation has no visibility into field level settings.

The proposed changes adding an ability for FieldMapper to get access field-level setting via ignoreMalformed() method.

Type Controlling class
ip IpFieldMapper
ip_range RangeFieldMapper
geo_point AbstractGeometryFieldMapper
geo_shape AbstractGeometryFieldMapper
xy_point AbstractGeometryFieldMapper
xy_shape AbstractGeometryFieldMapper
numerics NumberFieldMapper, ScaledFloatFieldMapper
derived DerivedFieldMapper
date DateFieldMapper

Related Issues

Resolves #16599

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…d override index-level setting

Signed-off-by: Mikhail Stepura <mstepura@apple.com>
@github-actions github-actions bot added bug Something isn't working good first issue Good for newcomers Indexing Indexing, Bulk Indexing and anything related to indexing labels Jul 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2025

✅ Gradle check result for be93286: SUCCESS

@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

Attention: Patch coverage is 82.75862% with 5 lines in your changes missing coverage. Please review.

Project coverage is 72.77%. Comparing base (548e467) to head (21d0cd5).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
.../java/org/opensearch/index/mapper/FieldMapper.java 55.55% 2 Missing and 2 partials ⚠️
...rg/opensearch/index/mapper/DerivedFieldMapper.java 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18706      +/-   ##
============================================
- Coverage     72.90%   72.77%   -0.14%     
+ Complexity    68587    68512      -75     
============================================
  Files          5566     5566              
  Lines        314701   314712      +11     
  Branches      45653    45653              
============================================
- Hits         229434   229032     -402     
- Misses        66655    67057     +402     
- Partials      18612    18623      +11     

☔ 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.

Signed-off-by: Mikhail Stepura <mstepura@apple.com>
@mishail mishail force-pushed the ms/16599-ignore-malformed branch from 2eb4878 to 1454d32 Compare July 9, 2025 00:47
@github-actions
Copy link
Contributor

❌ Gradle check result for 5f37584: 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?

@mishail
Copy link
Contributor Author

mishail commented Jul 16, 2025

Do we have a test anywhere that verifies the field level setting overrides an index-level setting? Perhaps a new case can be added here:

https://github.com/opensearch-project/OpenSearch/blob/3e9a420533f67157ea521fe23212a3a07754c2bf/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_ignore_malformed.yml

Now I've added a new test there. Let me know if that's sufficient

@github-actions
Copy link
Contributor

❌ Gradle check result for 76990b8: 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?

@mishail mishail force-pushed the ms/16599-ignore-malformed branch from 76990b8 to f44fbf4 Compare July 16, 2025 20:14
@github-actions
Copy link
Contributor

❌ Gradle check result for f44fbf4: 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
Contributor

❕ Gradle check result for 4336b3a: 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.

andrross and others added 4 commits July 16, 2025 21:03
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Mikhail Stepura <mikhail.stepura@outlook.com>
Signed-off-by: Mikhail Stepura <mstepura@apple.com>
Signed-off-by: Mikhail Stepura <mstepura@apple.com>
@mishail mishail force-pushed the ms/16599-ignore-malformed branch from 4336b3a to 5a095f2 Compare July 17, 2025 04:04
@github-actions
Copy link
Contributor

✅ Gradle check result for 5a095f2: SUCCESS

@mishail
Copy link
Contributor Author

mishail commented Jul 17, 2025

@andrross this is ready for review. Thanks for the feedback!

Signed-off-by: Mikhail Stepura <mstepura@apple.com>
@mishail mishail force-pushed the ms/16599-ignore-malformed branch from 83b0b4f to 21d0cd5 Compare July 17, 2025 21:45
@github-actions
Copy link
Contributor

✅ Gradle check result for 21d0cd5: SUCCESS

@andrross andrross merged commit 6e2ff5c into opensearch-project:main Jul 18, 2025
31 checks passed
pranikum pushed a commit to pranikum/OpenSearch that referenced this pull request Jul 21, 2025
…d override index-level setting (opensearch-project#18706)

* [fixes opensearch-project#16599] Field-level `ignore_malformed` should override index-level setting

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* CHANGELOG.md

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Update CHANGELOG.md

Co-authored-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Mikhail Stepura <mikhail.stepura@outlook.com>

* API level test

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Ignore for the versions without the fix

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Cleanup

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

---------

Signed-off-by: Mikhail Stepura <mstepura@apple.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Mikhail Stepura <mikhail.stepura@outlook.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Jul 22, 2025
…d override index-level setting (opensearch-project#18706)

* [fixes opensearch-project#16599] Field-level `ignore_malformed` should override index-level setting

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* CHANGELOG.md

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Update CHANGELOG.md

Co-authored-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Mikhail Stepura <mikhail.stepura@outlook.com>

* API level test

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Ignore for the versions without the fix

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Cleanup

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

---------

Signed-off-by: Mikhail Stepura <mstepura@apple.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Mikhail Stepura <mikhail.stepura@outlook.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
…d override index-level setting (opensearch-project#18706)

* [fixes opensearch-project#16599] Field-level `ignore_malformed` should override index-level setting

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* CHANGELOG.md

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Update CHANGELOG.md

Co-authored-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Mikhail Stepura <mikhail.stepura@outlook.com>

* API level test

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Ignore for the versions without the fix

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

* Cleanup

Signed-off-by: Mikhail Stepura <mstepura@apple.com>

---------

Signed-off-by: Mikhail Stepura <mstepura@apple.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Mikhail Stepura <mikhail.stepura@outlook.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working good first issue Good for newcomers Indexing Indexing, Bulk Indexing and anything related to indexing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Field-level ignore_malformed should override index-level setting

2 participants