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] Simulate ingest pipeline API throws illegal_argument_exception if remove processor is used #11604

Closed
gaobinlong opened this issue Dec 13, 2023 · 0 comments
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing v2.12.0 Issues and PRs related to version 2.12.0 v3.0.0 Issues and PRs related to version 3.0.0

Comments

@gaobinlong
Copy link
Collaborator

gaobinlong commented Dec 13, 2023

Describe the bug

When calling simulate ingest pipeline API, if the remove processor is used and the metadata field _version_type is not specified for the document, then the API always throws illegal_argument_exception which is not as expected.

This bug relates to this line which was added in this PR: #10895 :

String versionType = document.getFieldValue(IngestDocument.Metadata.VERSION_TYPE.getFieldName(), String.class);

I'll open a PR to fix this bug and add some yml test for it.

To Reproduce
Steps to reproduce the behavior:

POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [
      {
        "remove": {
          "field": "foo"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "foo": "bar"
      }
    }
  ]
}

Expected behavior
Simulate ingest pipeline API runs well no matter the metadata field _version_type is specified or not.

Host/Environment (please complete the following information):

  • OS: [macOS]
  • Version [main]
@gaobinlong gaobinlong added bug Something isn't working untriaged labels Dec 13, 2023
@ankitkala ankitkala added Indexing Indexing, Bulk Indexing and anything related to indexing and removed Other labels Dec 17, 2023
@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 v2.12.0 Issues and PRs related to version 2.12.0 and removed untriaged labels Jan 4, 2024
@reta reta closed this as completed Jan 4, 2024
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.12.0 Issues and PRs related to version 2.12.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

No branches or pull requests

4 participants