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

Fix FlintMetadata conversion issue in FlintOpenSearchClient #75

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

kaituo
Copy link
Collaborator

@kaituo kaituo commented Oct 17, 2023

Description

In flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java, we encountered a conversion problem when transforming the index mapping to FlintMetadata. The root cause can be traced back to changes made in this PR.

Previously, FlintMetadata stored its content as a simple string. However, the recent changes have made its structure more complex, introducing fields like version, name, kind, source, indexedColumns, options, properties, schema, and indexSettings.

Given that Flint index is specialized for storing covering index and materialized view metadata, it's not a typical data index. To address this, we've opted to use the OpenSearch rest client directly for the conversion.

Testing done:

  1. manual verification

Issues Resolved

#74

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.

In `flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java`, we encountered a conversion problem when transforming the index mapping to `FlintMetadata`. The root cause can be traced back to changes made in [this PR](https://github.com/opensearch-project/opensearch-spark/pull/70/files#diff-c3bdd10ec081d200e375aa601acff4c39b10bb4c34862634f56859f0054fedbf).

Previously, `FlintMetadata` stored its content as a simple string. However, the recent changes have made its structure more complex, introducing fields like `version`, `name`, `kind`, `source`, `indexedColumns`, `options`, `properties`, `schema`, and `indexSettings`.

Given that Flint index is specialized for storing covering index and materialized view metadata, it's not a typical data index. To address this, we've opted to use the OpenSearch rest client directly for the conversion.

Testing done:
1. manual verification

Signed-off-by: Kaituo Li <[email protected]>
Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@dai-chen
Copy link
Collaborator

@kaituo do you need help to merge this to main?

@kaituo
Copy link
Collaborator Author

kaituo commented Oct 17, 2023

@kaituo do you need help to merge this to main?

@dai-chen Yes, please.

@dai-chen dai-chen merged commit 14b4033 into opensearch-project:main Oct 17, 2023
4 checks passed
@dai-chen dai-chen added the bug Something isn't working label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants