-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Rename ingest processor supports overriding target field if exists #12990
Conversation
Signed-off-by: Gao Binlong <[email protected]>
Signed-off-by: Gao Binlong <[email protected]>
Compatibility status:Checks if related components are compatible with change 441b47b Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git] |
@reta, could you help to review this PR, thank you! |
❕ Gradle check result for 0c6457d: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12990 +/- ##
============================================
- Coverage 71.42% 71.33% -0.09%
- Complexity 59978 60481 +503
============================================
Files 4985 5033 +48
Lines 282275 284968 +2693
Branches 40946 41296 +350
============================================
+ Hits 201603 203275 +1672
- Misses 63999 64870 +871
- Partials 16673 16823 +150 ☔ View full report in Codecov by Sentry. |
Thanks @gaobinlong , I have concerns regarding this change, aligned with #12942 (comment). It does not look right (to me) and it basically just hides the problem (the field is not expected to be in the document but it is). Semantically, this change would apply to |
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.
Hi @gaobinlong,
I actually think the implementation of the change looks good.
I do agree with Peter's comment about this being better named something like move
. I don't have a problem with the behavior being similar to the Copy
processor but think that the majority of users may be more familiar with the Unix terminology for move, copy, etc.
Unless there is another naming pattern we have already committed to, I would generally be in favor of us being consistent with the behavior of Unix if we can.
This also ties into my opinion on why Copy
is not where I would expect this behavior.
https://unix.stackexchange.com/questions/277412/cp-vs-mv-which-operation-is-more-efficient
I think |
Thanks, do you mean the |
Agree, on the second thought, I think it would make sense to have such an option, thank you @gaobinlong for clarifying. |
Signed-off-by: Gao Binlong <[email protected]>
❕ Gradle check result for e1d501b: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Signed-off-by: Gao Binlong <[email protected]>
Hi @reta , now all checks have passed yet, could you help to review? |
LGTM, thanks @gaobinlong , it looks like we have no docs for this ingest processor (Rename Processor) [1], could you please create an issue to document it [2]? Thank you @scrawfor99 LGTY? [1] https://opensearch.org/docs/latest/ingest-pipelines/processors/index-processors/ |
Thank you @reta ,I've opened an issue and a related PR for the missing rename ingest processor, after the PR is merged and backported to old versions, I'll open another PR for the change in this PR. |
Hi @reta , could this PR be merged now? |
…12990) * Rename ingest processor supports overriding target field if exists Signed-off-by: Gao Binlong <[email protected]> * Modify change log Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 41a3055) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…12990) (#13348) * Rename ingest processor supports overriding target field if exists * Modify change log --------- (cherry picked from commit 41a3055) Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This PR adds a new parameter
override_target
to the rename ingest processor, when the parameter is true andtarget_field
already exists in the document, the processor will override the target field rather than throwing an errorfield [] already exists
.Related Issues
#12942
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.