-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Introduce mapping transformer to allow transform mappings during index create/update or index template create/update #17635
base: main
Are you sure you want to change the base?
Conversation
37b530b
to
7d47df7
Compare
response -> new CreateIndexResponse(response.isAcknowledged(), response.isShardsAcknowledged(), indexName) | ||
) | ||
); | ||
}, e -> { throw (RuntimeException) e; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exception is threw rather than using listener.onFailure because the behavior before this change is simply throw the exception. We don't want to change the existing behavior of how it handles the exception.
❌ Gradle check result for 7d47df7: 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? |
6f9c569
to
dc11eee
Compare
❌ Gradle check result for dc11eee: 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? |
...src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportPutMappingAction.java
Outdated
Show resolved
Hide resolved
...va/org/opensearch/action/admin/indices/template/put/TransportPutComponentTemplateAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/mapper/MappingTransformer.java
Outdated
Show resolved
Hide resolved
…ex create/update or index template create/update Signed-off-by: Bo Zhang <[email protected]>
dc11eee
to
c35c386
Compare
❌ Gradle check result for c35c386: 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? |
Description
In this PR we introduce the mapping transformer to the core to allow transforming the mapping during index create/update and index template create/update. We want to do this because we have a use case in neural search plugin where we want to auto generate the semantic fields(e.g. knn_vector or rank_feature) in the mappings based on the model id defined in the semantic field(A new field type introduced by neural search plugin). In this way we can simplify the neural search set up.
Potentially in future this feature can be leveraged by other plugins to auto transform the mapping based on the certain config defined by users.
Related Issues
Resolves #[17500] - Proposal to introduce the mapping transformer into core.
#[803] - Proposal to support semantic field in neural search.
#[1211] - HLD of the semantic field.
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.