title: Logstash substring a field using position using mutate
body: <p>I wonder if there is a way of using a substring when using <code>add_field</code> in mutate filter, maybe with %{field} syntax.<br>
  For example:</p>
  
  <pre><code>filter {
      mutate {
          add_field =&gt; { "shorter_field" =&gt; "%{field[0:4]}" }
      }
  }
  </code></pre>
  
  <p>I saw solutions using ruby filters, but I prefer only using mutate because I have a sequence of operation I'm doing using the filter and I prefer keeping it simple</p>