Skip to content

Conversation

@shatejas
Copy link
Contributor

@shatejas shatejas commented Sep 3, 2025

Description

This is a new mapper for context aware segments. It also has indexing side of changes and stores the grouping criteria in parsed documents

Related Issues

RFC: #19223

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.

@shatejas shatejas changed the title []Adds Namespace mapper [Draft] Adds Namespace mapper Sep 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

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

@shatejas shatejas force-pushed the namespace-mapper branch 3 times, most recently from 3298285 to 1147e4a Compare September 17, 2025 01:20
@shatejas shatejas changed the title [Draft] Adds Namespace mapper Adds a mapper for context aware segments grouping criteria Sep 17, 2025
@shatejas shatejas marked this pull request as ready for review September 17, 2025 01:23
@github-actions
Copy link
Contributor

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

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

❌ Gradle check result for ec031b2: 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: Tejas Shah <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

❌ Gradle check result for 3be7f35: 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

github-actions bot commented Oct 8, 2025

❌ Gradle check result for 81c6291: 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

github-actions bot commented Oct 8, 2025

✅ Gradle check result for 5a9e26c: SUCCESS

@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 80.92486% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.04%. Comparing base (39b7a59) to head (5a9e26c).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
.../index/mapper/ContextAwareGroupingFieldMapper.java 84.21% 6 Missing and 3 partials ⚠️
.../java/org/opensearch/index/mapper/FieldMapper.java 53.33% 5 Missing and 2 partials ⚠️
...a/org/opensearch/index/mapper/DateFieldMapper.java 28.57% 4 Missing and 1 partial ⚠️
...ch/index/mapper/ContextAwareGroupingFieldType.java 62.50% 3 Missing ⚠️
...va/org/opensearch/index/mapper/DocumentParser.java 82.35% 1 Missing and 2 partials ⚠️
...org/opensearch/index/mapper/NumberFieldMapper.java 78.57% 2 Missing and 1 partial ⚠️
...java/org/opensearch/index/mapper/ParseContext.java 75.00% 1 Missing and 1 partial ⚠️
...ava/org/opensearch/index/mapper/IpFieldMapper.java 94.73% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19233      +/-   ##
============================================
+ Coverage     73.00%   73.04%   +0.04%     
- Complexity    70534    70585      +51     
============================================
  Files          5719     5722       +3     
  Lines        323260   323387     +127     
  Branches      46816    46833      +17     
============================================
+ Hits         235993   236220     +227     
+ Misses        68224    68063     -161     
- Partials      19043    19104      +61     

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

@jed326 jed326 added the v3.4.0 Issues and PRs related to version 3.4.0 label Oct 8, 2025
@jed326 jed326 merged commit 58a75f0 into opensearch-project:main Oct 8, 2025
37 checks passed
aparajita31pandey pushed a commit to aparajita31pandey/OpenSearch that referenced this pull request Oct 9, 2025
…h-project#19233)

* Adds Context aware grouping  mapper

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>

* Adds a test for ContextAwareGroupingScript

Signed-off-by: Tejas Shah <[email protected]>

* Adds ContextAwareGroupingScript support in mockScriptEngine to fix integ tests

Signed-off-by: Tejas Shah <[email protected]>

* Corrects CHANGELOG.md

Signed-off-by: Tejas Shah <[email protected]>

* Fixes LangPainlessClientYamlTestSuiteIT

Signed-off-by: Tejas Shah <[email protected]>

---------

Signed-off-by: Tejas Shah <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Oct 11, 2025
…h-project#19233)

* Adds Context aware grouping  mapper

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>

* Adds a test for ContextAwareGroupingScript

Signed-off-by: Tejas Shah <[email protected]>

* Adds ContextAwareGroupingScript support in mockScriptEngine to fix integ tests

Signed-off-by: Tejas Shah <[email protected]>

* Corrects CHANGELOG.md

Signed-off-by: Tejas Shah <[email protected]>

* Fixes LangPainlessClientYamlTestSuiteIT

Signed-off-by: Tejas Shah <[email protected]>

---------

Signed-off-by: Tejas Shah <[email protected]>
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Oct 11, 2025
…h-project#19233)

* Adds Context aware grouping  mapper

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>

* Adds a test for ContextAwareGroupingScript

Signed-off-by: Tejas Shah <[email protected]>

* Adds ContextAwareGroupingScript support in mockScriptEngine to fix integ tests

Signed-off-by: Tejas Shah <[email protected]>

* Corrects CHANGELOG.md

Signed-off-by: Tejas Shah <[email protected]>

* Fixes LangPainlessClientYamlTestSuiteIT

Signed-off-by: Tejas Shah <[email protected]>

---------

Signed-off-by: Tejas Shah <[email protected]>
karenyrx pushed a commit that referenced this pull request Oct 14, 2025
* Introduce Interceptor to Grpc Plugin - Signed-off-by: Aparajita Pandey <[email protected]>

Signed-off-by: Aparajita Pandey <[email protected]>

* This is a combination of 7 commits.

Add testcases for gRPC Interceptor

Signed-off-by: Aparajita Pandey <[email protected]>

Ran spotlessAppy

Signed-off-by: Aparajita Pandey <[email protected]>

refactor

Signed-off-by: Aparajita Pandey <[email protected]>

spotlesssCheck

Signed-off-by: Aparajita Pandey <[email protected]>

check if it verified

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

check if it verified

Signed-off-by: Aparajita Pandey <[email protected]>

revert

Signed-off-by: Aparajita Pandey <[email protected]>

empty commit

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

testCases

Signed-off-by: Aparajita Pandey <[email protected]>

logger

Signed-off-by: Aparajita Pandey <[email protected]>

Resolve Conflict

Signed-off-by: Aparajita Pandey <[email protected]>

javadoc

Signed-off-by: Aparajita Pandey <[email protected]>

* javadoc

Signed-off-by: Aparajita Pandey <[email protected]>

* cleanuo

Signed-off-by: Aparajita Pandey <[email protected]>

* move GrpcInterceptor Interface to spi

Signed-off-by: Aparajita Pandey <[email protected]>

* move GrpcInterceptor Interface to spi

Signed-off-by: Aparajita Pandey <[email protected]>

* build.gradle fixes

Signed-off-by: Aparajita Pandey <[email protected]>

* GrpcInterceptorChain refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* GrpcInterceptorChain refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* rebase

Signed-off-by: Aparajita Pandey <[email protected]>

* coverage

Signed-off-by: Aparajita Pandey <[email protected]>

* spotless

Signed-off-by: Aparajita Pandey <[email protected]>

* Add logic to throw exception on workload group deletion with associated rules (#19502)

Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* add documentation about debug-server-jvm in testing.md (#19567)

Signed-off-by: Vigya Sharma <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* Adds a mapper for context aware segments grouping criteria (#19233)

* Adds Context aware grouping  mapper

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>

* Adds a test for ContextAwareGroupingScript

Signed-off-by: Tejas Shah <[email protected]>

* Adds ContextAwareGroupingScript support in mockScriptEngine to fix integ tests

Signed-off-by: Tejas Shah <[email protected]>

* Corrects CHANGELOG.md

Signed-off-by: Tejas Shah <[email protected]>

* Fixes LangPainlessClientYamlTestSuiteIT

Signed-off-by: Tejas Shah <[email protected]>

---------

Signed-off-by: Tejas Shah <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* Refactor README.md and GrpcInterceptorChain Constructor

Signed-off-by: Aparajita Pandey <[email protected]>

* UpdateREADME & switch to implmentation

Signed-off-by: Aparajita Pandey <[email protected]>

* refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* Address PR review comments

- Changed SPI dependencies from api to implementation
- Made OrderedGrpcInterceptor a nested interface inside GrpcInterceptorProvider
- Updated README with build.gradle extension declaration examples
- Simplified duplicate order handling documentation

Signed-off-by: Aparajita Pandey <[email protected]>

* empty commit

Signed-off-by: Aparajita Pandey <[email protected]>

* resolve conflict

Signed-off-by: Aparajita Pandey <[email protected]>

---------

Signed-off-by: Aparajita Pandey <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Vigya Sharma <[email protected]>
Signed-off-by: Tejas Shah <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>
Co-authored-by: Kaushal Kumar <[email protected]>
Co-authored-by: Vigya Sharma <[email protected]>
Co-authored-by: Tejas Shah <[email protected]>
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Oct 15, 2025
…h-project#19233)

* Adds Context aware grouping  mapper

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>

* Adds a test for ContextAwareGroupingScript

Signed-off-by: Tejas Shah <[email protected]>

* Adds ContextAwareGroupingScript support in mockScriptEngine to fix integ tests

Signed-off-by: Tejas Shah <[email protected]>

* Corrects CHANGELOG.md

Signed-off-by: Tejas Shah <[email protected]>

* Fixes LangPainlessClientYamlTestSuiteIT

Signed-off-by: Tejas Shah <[email protected]>

---------

Signed-off-by: Tejas Shah <[email protected]>
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Oct 15, 2025
…ct#19005)

* Introduce Interceptor to Grpc Plugin - Signed-off-by: Aparajita Pandey <[email protected]>

Signed-off-by: Aparajita Pandey <[email protected]>

* This is a combination of 7 commits.

Add testcases for gRPC Interceptor

Signed-off-by: Aparajita Pandey <[email protected]>

Ran spotlessAppy

Signed-off-by: Aparajita Pandey <[email protected]>

refactor

Signed-off-by: Aparajita Pandey <[email protected]>

spotlesssCheck

Signed-off-by: Aparajita Pandey <[email protected]>

check if it verified

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

check if it verified

Signed-off-by: Aparajita Pandey <[email protected]>

revert

Signed-off-by: Aparajita Pandey <[email protected]>

empty commit

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

testCases

Signed-off-by: Aparajita Pandey <[email protected]>

logger

Signed-off-by: Aparajita Pandey <[email protected]>

Resolve Conflict

Signed-off-by: Aparajita Pandey <[email protected]>

javadoc

Signed-off-by: Aparajita Pandey <[email protected]>

* javadoc

Signed-off-by: Aparajita Pandey <[email protected]>

* cleanuo

Signed-off-by: Aparajita Pandey <[email protected]>

* move GrpcInterceptor Interface to spi

Signed-off-by: Aparajita Pandey <[email protected]>

* move GrpcInterceptor Interface to spi

Signed-off-by: Aparajita Pandey <[email protected]>

* build.gradle fixes

Signed-off-by: Aparajita Pandey <[email protected]>

* GrpcInterceptorChain refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* GrpcInterceptorChain refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* rebase

Signed-off-by: Aparajita Pandey <[email protected]>

* coverage

Signed-off-by: Aparajita Pandey <[email protected]>

* spotless

Signed-off-by: Aparajita Pandey <[email protected]>

* Add logic to throw exception on workload group deletion with associated rules (opensearch-project#19502)

Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* add documentation about debug-server-jvm in testing.md (opensearch-project#19567)

Signed-off-by: Vigya Sharma <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* Adds a mapper for context aware segments grouping criteria (opensearch-project#19233)

* Adds Context aware grouping  mapper

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>

* Adds a test for ContextAwareGroupingScript

Signed-off-by: Tejas Shah <[email protected]>

* Adds ContextAwareGroupingScript support in mockScriptEngine to fix integ tests

Signed-off-by: Tejas Shah <[email protected]>

* Corrects CHANGELOG.md

Signed-off-by: Tejas Shah <[email protected]>

* Fixes LangPainlessClientYamlTestSuiteIT

Signed-off-by: Tejas Shah <[email protected]>

---------

Signed-off-by: Tejas Shah <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* Refactor README.md and GrpcInterceptorChain Constructor

Signed-off-by: Aparajita Pandey <[email protected]>

* UpdateREADME & switch to implmentation

Signed-off-by: Aparajita Pandey <[email protected]>

* refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* Address PR review comments

- Changed SPI dependencies from api to implementation
- Made OrderedGrpcInterceptor a nested interface inside GrpcInterceptorProvider
- Updated README with build.gradle extension declaration examples
- Simplified duplicate order handling documentation

Signed-off-by: Aparajita Pandey <[email protected]>

* empty commit

Signed-off-by: Aparajita Pandey <[email protected]>

* resolve conflict

Signed-off-by: Aparajita Pandey <[email protected]>

---------

Signed-off-by: Aparajita Pandey <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Vigya Sharma <[email protected]>
Signed-off-by: Tejas Shah <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>
Co-authored-by: Kaushal Kumar <[email protected]>
Co-authored-by: Vigya Sharma <[email protected]>
Co-authored-by: Tejas Shah <[email protected]>
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Oct 18, 2025
…ct#19005)

* Introduce Interceptor to Grpc Plugin - Signed-off-by: Aparajita Pandey <[email protected]>

Signed-off-by: Aparajita Pandey <[email protected]>

* This is a combination of 7 commits.

Add testcases for gRPC Interceptor

Signed-off-by: Aparajita Pandey <[email protected]>

Ran spotlessAppy

Signed-off-by: Aparajita Pandey <[email protected]>

refactor

Signed-off-by: Aparajita Pandey <[email protected]>

spotlesssCheck

Signed-off-by: Aparajita Pandey <[email protected]>

check if it verified

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

check if it verified

Signed-off-by: Aparajita Pandey <[email protected]>

revert

Signed-off-by: Aparajita Pandey <[email protected]>

empty commit

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

Added GrpcInterceptorChain

Signed-off-by: Aparajita Pandey <[email protected]>

testCases

Signed-off-by: Aparajita Pandey <[email protected]>

logger

Signed-off-by: Aparajita Pandey <[email protected]>

Resolve Conflict

Signed-off-by: Aparajita Pandey <[email protected]>

javadoc

Signed-off-by: Aparajita Pandey <[email protected]>

* javadoc

Signed-off-by: Aparajita Pandey <[email protected]>

* cleanuo

Signed-off-by: Aparajita Pandey <[email protected]>

* move GrpcInterceptor Interface to spi

Signed-off-by: Aparajita Pandey <[email protected]>

* move GrpcInterceptor Interface to spi

Signed-off-by: Aparajita Pandey <[email protected]>

* build.gradle fixes

Signed-off-by: Aparajita Pandey <[email protected]>

* GrpcInterceptorChain refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* GrpcInterceptorChain refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* rebase

Signed-off-by: Aparajita Pandey <[email protected]>

* coverage

Signed-off-by: Aparajita Pandey <[email protected]>

* spotless

Signed-off-by: Aparajita Pandey <[email protected]>

* Add logic to throw exception on workload group deletion with associated rules (opensearch-project#19502)

Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* add documentation about debug-server-jvm in testing.md (opensearch-project#19567)

Signed-off-by: Vigya Sharma <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* Adds a mapper for context aware segments grouping criteria (opensearch-project#19233)

* Adds Context aware grouping  mapper

The change also stores grouping criteria for each doc in parsed context

Signed-off-by: Tejas Shah <[email protected]>

* Adds a test for ContextAwareGroupingScript

Signed-off-by: Tejas Shah <[email protected]>

* Adds ContextAwareGroupingScript support in mockScriptEngine to fix integ tests

Signed-off-by: Tejas Shah <[email protected]>

* Corrects CHANGELOG.md

Signed-off-by: Tejas Shah <[email protected]>

* Fixes LangPainlessClientYamlTestSuiteIT

Signed-off-by: Tejas Shah <[email protected]>

---------

Signed-off-by: Tejas Shah <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>

* Refactor README.md and GrpcInterceptorChain Constructor

Signed-off-by: Aparajita Pandey <[email protected]>

* UpdateREADME & switch to implmentation

Signed-off-by: Aparajita Pandey <[email protected]>

* refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* refactoring

Signed-off-by: Aparajita Pandey <[email protected]>

* Address PR review comments

- Changed SPI dependencies from api to implementation
- Made OrderedGrpcInterceptor a nested interface inside GrpcInterceptorProvider
- Updated README with build.gradle extension declaration examples
- Simplified duplicate order handling documentation

Signed-off-by: Aparajita Pandey <[email protected]>

* empty commit

Signed-off-by: Aparajita Pandey <[email protected]>

* resolve conflict

Signed-off-by: Aparajita Pandey <[email protected]>

---------

Signed-off-by: Aparajita Pandey <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Vigya Sharma <[email protected]>
Signed-off-by: Tejas Shah <[email protected]>
Signed-off-by: Aparajita Pandey <[email protected]>
Co-authored-by: Kaushal Kumar <[email protected]>
Co-authored-by: Vigya Sharma <[email protected]>
Co-authored-by: Tejas Shah <[email protected]>
@coderabbitai coderabbitai bot mentioned this pull request Dec 25, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3.4.0 Issues and PRs related to version 3.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants