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

Ingest: Lowercase/uppercase processor: Support arrays #51087

Closed
fkelbert opened this issue Jan 16, 2020 · 2 comments
Closed

Ingest: Lowercase/uppercase processor: Support arrays #51087

fkelbert opened this issue Jan 16, 2020 · 2 comments
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement Team:Data Management Meta label for data/management team

Comments

@fkelbert
Copy link
Contributor

fkelbert commented Jan 16, 2020

Elastic Cloud 7.5

The lowercase/uppercase ingest processors (and possibly others) do currently not allow to process a field containing an array of values. Given the fact that many aspects in Elasticsearch do not make a difference between single-value fields and array-valued fields, this is a behaviour that I would have expected.

Note that this is different from #51048.

Current workaround: use foreach processor.

POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [
      {
        "lowercase": {
          "field": "test"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "test": [ "FOO", "BAR" ]
      }
    }
    ]
}

Result:

{
  "docs" : [
    {
      "error" : {
        "root_cause" : [
          {
            "type" : "ingest_processor_exception",
            "reason" : "java.lang.IllegalArgumentException: field [test] of type [java.util.ArrayList] cannot be cast to [java.lang.String]"
          }
        ],
        "type" : "illegal_argument_exception",
        "reason" : "field [test] of type [java.util.ArrayList] cannot be cast to [java.lang.String]"
      }
    }
  ]
}
@fkelbert fkelbert added >enhancement :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP labels Jan 16, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Ingest)

@danhermann
Copy link
Contributor

Resolved by #53343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests

4 participants