-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Revert "Remove deprecated constant META_FIELDS_BEFORE_7DOT8 (#13860)" #13916
Conversation
…ch-project#13860)" This reverts commit 9832972.
Signed-off-by: Craig Perkins <[email protected]>
❌ Gradle check result for b59af56: 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? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13916 +/- ##
============================================
+ Coverage 71.42% 71.69% +0.27%
- Complexity 59978 61358 +1380
============================================
Files 4985 5064 +79
Lines 282275 288113 +5838
Branches 40946 41719 +773
============================================
+ Hits 201603 206571 +4968
- Misses 63999 64474 +475
- Partials 16673 17068 +395 ☔ View full report in Codecov by Sentry. |
…ch-project#13860)" (opensearch-project#13916) * Revert "Remove deprecated constant META_FIELDS_BEFORE_7DOT8 (opensearch-project#13860)" This reverts commit 9832972. * Update CHANGELOG-3.0 Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
…ch-project#13860)" (opensearch-project#13916) * Revert "Remove deprecated constant META_FIELDS_BEFORE_7DOT8 (opensearch-project#13860)" This reverts commit 9832972. * Update CHANGELOG-3.0 Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
This reverts commit 9832972.
Description
Opening a PR to discuss this reversion. Removing this deprecated constant caused issues in the SQL Plugin which references the constant. See opensearch-project/sql#2701 where they are working to adapt.
During Union operations, the SQL plugin relies on this list to differentiate between a metafield and a docfield. Ideally, the sql plugin can use MapperService.isMetadataField to determine from the official registry of mappers if a field is a metafield, but getting an instance of the mapper service within a plugin is proving to be tricky.
The security plugin uses Guice, to get the IndicesService:
Security can then get the indicesService using OpenSearchSecurityPlugin.GuiceHolder.getIndicesService() which then allows it to get a handle on the mapperService.
This PR is to temporarily fix SQL's CI issues from this change until a strategic fix is implemented.
For extra context around the fields in this list: (Copying comment from here)
7DOT8 is referring to ES 7.8.
"_ttl" and "_timestamp" were removed in ES6. See https://www.elastic.co/blog/elasticsearch-5-0-0-alpha4-released
"_type" was renamed to "_nested_path" in OS 2: #3196
"_size" is not a built-in metadata mapper, it comes from the mapper-size plugin which is not installed by default. Using mapperService.isMetadataField("_size") should return true if the mapper-size plugin is installed in the cluster.
The other values in this list still exist and are built-in metadata fields so mapperService.isMetadataField() should return true.
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.