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

[BUG] The ignore_missing parameter has no effect when using template snippet in rename ingest processor #9687

Closed
gaobinlong opened this issue Sep 1, 2023 · 1 comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing v2.11.0 Issues and PRs related to version 2.11.0

Comments

@gaobinlong
Copy link
Collaborator

Describe the bug
When creating a rename ingest processor, set field to a template snippet {{field_a}} and set ignore_missing to true, if field_a doesn't exist in the document, the processor throws an error rather than doing nothing.

To Reproduce
Steps to reproduce the behavior:

POST _ingest/pipeline/_simulate
{
  "pipeline" :
  {
    "processors": [
      {
        "rename" : {
          "field" : "{{foo_1}}",
          "target_field": "zoo", 
          "ignore_missing": true
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "index",
      "_id": "id",
      "_source": {
        "foo":"bar"
      }
    }
  ]
}

, then we get:

{
  "docs": [
    {
      "error": {
        "root_cause": [
          {
            "type": "illegal_argument_exception",
            "reason": "path cannot be null nor empty"
          }
        ],
        "type": "illegal_argument_exception",
        "reason": "path cannot be null nor empty"
      }
    }
  ]
}

The result of setting ignore_missing to true and false are the same.
Expected behavior
When setting ignore_missing to true, rename ingest processor exits quietly without throwing an error.

Host/Environment (please complete the following information):

  • OS: [Mac OS]
  • Version [OpenSearch 2.9]
@gaobinlong gaobinlong added bug Something isn't working untriaged labels Sep 1, 2023
@tlfeng tlfeng added the Indexing Indexing, Bulk Indexing and anything related to indexing label Sep 5, 2023
@gaobinlong
Copy link
Collaborator Author

Fixed by #9725.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing v2.11.0 Issues and PRs related to version 2.11.0
Projects
None yet
Development

No branches or pull requests

3 participants