Is there a better way to convert long to boolean

I have a field where values are stored as long (0 for false and 1 for true). I wanted to store them as booleans but the boolean convert filter doesn't accept other type than string.

The only way I found to do this is to duplicate the mutate filter like this :

filter {
  mutate {
    convert => {
      "myField" => "string"
    }
  }
  mutate {
    convert => {
      "myField" => "boolean"
    }
  }
}

Isn't there a better way to do this ?

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