Ingest Node - Convert Processor


(Joar Svensson) #1

I'm having difficulties using the Convert Processor on nested fields. The fields seems to be skipped in the pipeline. Can't find any information in the docs regarding if it's supported or not.

Running ES 5.0.1, any hints on what to try or how to debug in a good way?

This is my config:

 {
     "convert": {
        "field": "timeOfSearch.dayOfMonth",
        "type": "integer",
        "ignore_failure": true
     }
  }

(David Pilato) #2

This works well for me:

GET _ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [
      {
        "convert": {
          "field": "timeOfSearch.dayOfMonth",
          "type": "integer"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "timeOfSearch": {
          "dayOfMonth": "02"
        }
      }
    }
  ]
}

Gives:

{
  "docs": [
    {
      "doc": {
        "_index": "_index",
        "_id": "_id",
        "_type": "_type",
        "_source": {
          "timeOfSearch": {
            "dayOfMonth": 2
          }
        },
        "_ingest": {
          "timestamp": "2016-11-23T08:53:22.417+0000"
        }
      }
    }
  ]
}

(Joar Svensson) #3

Great! I use the pipeline after parsing JSON lines from Filebeat. It might be related to that, I will investigate further.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.