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

DateProcessor does not support unix epoch format #26967

Closed
iksnalybok opened this issue Oct 11, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@iksnalybok
Copy link
Contributor

commented Oct 11, 2017

This issue is similar to #26890, but affects the DateProcessor instead of the DateIndexNameProcessor.

Error is

Caused by: java.lang.IllegalArgumentException: field [json.timeMillis] of type [java.lang.Long] cannot be cast to [java.lang.String]
      at org.elasticsearch.ingest.IngestDocument.cast(IngestDocument.java:542)
      at org.elasticsearch.ingest.IngestDocument.getFieldValue(IngestDocument.java:107)
      at org.elasticsearch.ingest.common.DateProcessor.execute(DateProcessor.java:67)
      at org.elasticsearch.ingest.CompoundProcessor.execute(CompoundProcessor.java:100)

To reproduce (tested with local build 7.0.0-alpha1-SNAPSHOT, commitId d97b21d), follow the exact same steps as #26890, except that the definition of the pipeline is:

curl -XPUT "http://localhost:9200/_ingest/pipeline/bugTimestampPipeline" -H 'Content-Type: application/json' -d'
  {
    "description": "bugTimestampPipeline",
    "processors" : [
      {
        "date" : {
          "field" : "json.timeMillis",
          "target_field" : "json.timeHuman",
          "formats" : [ "UNIX_MS", "yyyy-MM-dd HH:mm:ss.SSSZ" ]
        }
      }
    ]
  }'
@martijnvg

This comment has been minimized.

Copy link
Member

commented Oct 12, 2017

@iksnalybok Thanks for reporting this! This bug will be fixed soon.

@martijnvg martijnvg closed this in 141d1b6 Oct 23, 2017

martijnvg added a commit that referenced this issue Oct 23, 2017

martijnvg added a commit that referenced this issue Oct 23, 2017

martijnvg added a commit that referenced this issue Oct 23, 2017

martijnvg added a commit that referenced this issue Oct 23, 2017

@iksnalybok

This comment has been minimized.

Copy link
Contributor Author

commented Oct 25, 2017

It works like a charm. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.