Support for fields containing dots in their name as literals#19958
Support for fields containing dots in their name as literals#19958bharath-techie merged 65 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for 659aa26: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for 5405ee6: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for f9fa2ba: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for bd8e0c6: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for ecf3e8b: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for e505b3e: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for 3c56a97: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughAdd a new ObjectMapper Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant Templates as "Index Templates"
participant Metadata as "MetadataCreateIndexService"
participant MapperFactory as "ObjectMapper / RootObjectMapper"
participant Parser as "DocumentParser"
participant Mappings as "MapperService / Mappings"
Client->>Templates: define templates (may set disable_objects)
Client->>Metadata: create index / merge request (includes request mapping)
Templates->>Metadata: provide template mappings
Metadata->>Metadata: collect mappings (templates first, request last)
Metadata->>Metadata: applyDisableObjectsOverrides() to compute effective disable_objects
Metadata->>MapperFactory: build/register mapping with effective disable_objects
Client->>Parser: send document to index
Parser->>MapperFactory: resolve mapper for field path
alt effective disable_objects = true
Parser->>Parser: flatten object/array into dotted fields
Parser->>Mappings: create/update flat dotted-field mappers
else
Parser->>Parser: normal nested traversal / create intermediates
Parser->>Mappings: create/update nested mappers
end
Mappings-->>Client: indexing acknowledged
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for bd83c0b: 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? |
Signed-off-by: Mohit Kumar <mohitamg@amazon.com>
|
❌ Gradle check result for c711dcb: 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? |
…rch-project#19958) * Add preserve_dots paramater to ObjectMapper Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Extend RootObjectMapper to support preserve_dots Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Implement flat field parsing in DocumentParser Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Implement validation in MapperService Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Add index template support for preserve_dots tests Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * error handling with descriptive messages Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing redundancy Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more edge cases, autoflatten and test cases Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more edge cases, autoflatten and test cases Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding autoflattening at nested level as well Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing gradle spotless checks Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Stab at optimizing the code via removing redundant code and fixing multiple functions Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing splitPathRespectingDisableObjects and trying to achieve it through existing getMapper function Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Revert "Reduction of if else statements by extracting conditional logic into focused methods" This reverts commit 9ca7e6d. Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * [Plugins] Relax jar hell check when extended plugins share transitive dependencies (opensearch-project#20103) * plugin service allow multiple extended plugins both extend the same module/plugin Signed-off-by: Karen X <karenxyr@gmail.com> * fix tests Signed-off-by: Karen X <karenxyr@gmail.com> --------- Signed-off-by: Karen X <karenxyr@gmail.com> Co-authored-by: karenx <karenx@uber.com> * Reverting change in CHANGELOG.md Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Add integ test for simulating node join left event when data node clu… (opensearch-project#19907) * Add integration test for simulating node join left event when data node cluster state publication lag because the cluster applier thread being busy. Signed-off-by: Swetha Guptha <gupthasg@amazon.com> Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding few more UTs in DocumentParserTests and ObjectMapperTests for code patch coverage Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding changes in CHANGELOG.md Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more tests for code patch coverage for DocumentParser and ObjectMapper Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow1 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow2 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow3 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more tests for code patch coverage for DocumentParser and ObjectMapper second round and refactoring of code especially dynamic update portion Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing dead end code from Document Parser related to parseArray and parseObject Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow4 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow4 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow5 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow6 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow6 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow7 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow8 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing breaking changes in ObjectMapper builder method Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing spotless checks Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow9 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow9 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Handling v2 templates for dotted field feature and stab at using existing methods in switch case Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Handling v2 templates for dotted field feature and stab at using existing methods in switch case Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing org.opensearch.indices.template.SimpleIndexTemplateIT IT Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing array mapping with nested disable_objects as true Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Addressed review comments and removed redundant code Signed-off-by: Mohit Kumar <mohitamg@amazon.com> --------- Signed-off-by: Mohit Kumar <mohitamg@amazon.com> Signed-off-by: mohit10011999 <pinkijyoti1995@gmail.com> Signed-off-by: Karen X <karenxyr@gmail.com> Signed-off-by: Swetha Guptha <gupthasg@amazon.com> Co-authored-by: Mohit Kumar <mohitamg@amazon.com> Co-authored-by: Karen X <karenxyr@gmail.com> Co-authored-by: karenx <karenx@uber.com> Co-authored-by: Swetha Guptha <gupthasg@amazon.com>
…rch-project#19958) * Add preserve_dots paramater to ObjectMapper Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Extend RootObjectMapper to support preserve_dots Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Implement flat field parsing in DocumentParser Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Implement validation in MapperService Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Add index template support for preserve_dots tests Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * error handling with descriptive messages Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing redundancy Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more edge cases, autoflatten and test cases Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more edge cases, autoflatten and test cases Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding autoflattening at nested level as well Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing gradle spotless checks Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Stab at optimizing the code via removing redundant code and fixing multiple functions Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing splitPathRespectingDisableObjects and trying to achieve it through existing getMapper function Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Reduction of if else statements by extracting conditional logic into focused methods Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Revert "Reduction of if else statements by extracting conditional logic into focused methods" This reverts commit 9ca7e6d. Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * [Plugins] Relax jar hell check when extended plugins share transitive dependencies (opensearch-project#20103) * plugin service allow multiple extended plugins both extend the same module/plugin Signed-off-by: Karen X <karenxyr@gmail.com> * fix tests Signed-off-by: Karen X <karenxyr@gmail.com> --------- Signed-off-by: Karen X <karenxyr@gmail.com> Co-authored-by: karenx <karenx@uber.com> * Reverting change in CHANGELOG.md Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Add integ test for simulating node join left event when data node clu… (opensearch-project#19907) * Add integration test for simulating node join left event when data node cluster state publication lag because the cluster applier thread being busy. Signed-off-by: Swetha Guptha <gupthasg@amazon.com> Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding few more UTs in DocumentParserTests and ObjectMapperTests for code patch coverage Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding changes in CHANGELOG.md Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more tests for code patch coverage for DocumentParser and ObjectMapper Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow1 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow2 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow3 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding more tests for code patch coverage for DocumentParser and ObjectMapper second round and refactoring of code especially dynamic update portion Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing dead end code from Document Parser related to parseArray and parseObject Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow4 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow4 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow5 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow6 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow6 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow7 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow8 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing breaking changes in ObjectMapper builder method Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing spotless checks Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow9 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Trigger workflow9 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Handling v2 templates for dotted field feature and stab at using existing methods in switch case Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Handling v2 templates for dotted field feature and stab at using existing methods in switch case Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing org.opensearch.indices.template.SimpleIndexTemplateIT IT Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing array mapping with nested disable_objects as true Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Addressed review comments and removed redundant code Signed-off-by: Mohit Kumar <mohitamg@amazon.com> --------- Signed-off-by: Mohit Kumar <mohitamg@amazon.com> Signed-off-by: mohit10011999 <pinkijyoti1995@gmail.com> Signed-off-by: Karen X <karenxyr@gmail.com> Signed-off-by: Swetha Guptha <gupthasg@amazon.com> Co-authored-by: Mohit Kumar <mohitamg@amazon.com> Co-authored-by: Karen X <karenxyr@gmail.com> Co-authored-by: karenx <karenx@uber.com> Co-authored-by: Swetha Guptha <gupthasg@amazon.com>
Description
Add the
disable_objectsfield with default value of false to ObjectMapperRelated Issues
Resolves #[Issue number to be closed when this PR is merged]
#11749
RFC - #20125
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.