-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ClassCastException when using dynamic template with flat_object mapping and dots in field names #13081
Conversation
…apping and dots in field names Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Compatibility status:Checks if related components are compatible with change fce90d2 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git] |
❌ Gradle check result for b886c7e: 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? |
❕ Gradle check result for fce90d2: 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13081 +/- ##
============================================
+ Coverage 71.42% 71.48% +0.06%
- Complexity 59978 60462 +484
============================================
Files 4985 5026 +41
Lines 282275 284456 +2181
Branches 40946 41197 +251
============================================
+ Hits 201603 203350 +1747
- Misses 63999 64311 +312
- Partials 16673 16795 +122 ☔ View full report in Codecov by Sentry. |
Description
Opening a draft PR to solicit feedback. This fixes an issue that can cause the DocumentParser to throw a ClassCastException when there is a dynamic template with a
flat_object
mapping and trying to index a document that contains field names with dots.Instead of the ClassCastException, this PR will still fail the request but with a more descriptive error message saying that dots in field names is forbidden using a dynamic template with
flat_object
mapping. This is similar to existing behavior with dynamic templates with anested
mapping. See similar test.Related Issues
Resolves #12298
Check List
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.