Skip to content
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

Support object fields in star-tree index #16728

Merged

Conversation

bharath-techie
Copy link
Contributor

@bharath-techie bharath-techie commented Nov 27, 2024

Description

We'll support object type fields with this change for star-tree index.
Star-tree index will still block array values for the object fields.

Example :

{
    "settings": {
        "index.number_of_shards": 1,
        "index.composite_index": true
    },
    "mappings": {
        "composite": {
            "startree1": {
                "type": "star_tree",
                "config": {
                    "ordered_dimensions": [
                        {
                            "name": "nested.status"
                        },
                        {
                            "name": "geoip.country_name"
                        }
                    ],
                    "metrics": [
                        {
                            "name": "nested.status"
                        }
                    ]
                }
            }
        },
        "properties": {
            "nested": {
                "properties" : {
                    "status": {
                        "type": "integer"
                    }
                }
            },
            "geoip": {
                "properties": {
                    "country_name": {
                        "type": "keyword"
                    }
                }
            }
        }
    }
}

Related Issues

#16730

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.

Signed-off-by: bharath-techie <bharath78910@gmail.com>
Copy link
Contributor

✅ Gradle check result for 1ae7561: SUCCESS

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 72.28%. Comparing base (7ae66d0) to head (270bc13).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...va/org/opensearch/index/mapper/StarTreeMapper.java 72.72% 5 Missing and 1 partial ⚠️
...va/org/opensearch/index/mapper/DocumentParser.java 20.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16728      +/-   ##
============================================
- Coverage     72.28%   72.28%   -0.01%     
- Complexity    65238    65286      +48     
============================================
  Files          5297     5299       +2     
  Lines        303351   303510     +159     
  Branches      43918    43935      +17     
============================================
+ Hits         219279   219386     +107     
- Misses        66120    66138      +18     
- Partials      17952    17986      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: bharath-techie <bharath78910@gmail.com>
Copy link
Contributor

✅ Gradle check result for b1f8fba: SUCCESS

@sachinpkale sachinpkale changed the title Supporting object fields in star-tree index Support object fields in star-tree index Dec 19, 2024
@sachinpkale
Copy link
Member

Use imperative mood in the PR title - PR title becomes commit message after merging (I have changed it for this PR Supporting -> Support)

@sachinpkale
Copy link
Member

Changes look good, please add changelog entry.

Copy link
Contributor

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

@bharath-techie bharath-techie force-pushed the nested-starindex branch 2 times, most recently from 3897a5e to 4da6d64 Compare December 20, 2024 09:43
Copy link
Contributor

✅ Gradle check result for 4da6d64: SUCCESS

Signed-off-by: bharath-techie <bharath78910@gmail.com>
@bharath-techie bharath-techie added the backport 2.x Backport to 2.x branch label Jan 2, 2025
@bharath-techie bharath-techie self-assigned this Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

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

Copy link
Contributor

github-actions bot commented Jan 3, 2025

✅ Gradle check result for 270bc13: SUCCESS

@sachinpkale sachinpkale merged commit d7641ca into opensearch-project:main Jan 6, 2025
37 of 39 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-16728-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d7641ca8788441e384fbde6c58b6f2530ec8772d
# Push it to GitHub
git push --set-upstream origin backport/backport-16728-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-16728-to-2.x.

bugmakerrrrrr pushed a commit to bugmakerrrrrr/OpenSearch that referenced this pull request Jan 8, 2025
---------

Signed-off-by: bharath-techie <bharath78910@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants