title: elasticsearch-painless - Manipulate date
body: <p>I am trying to manipulate date in elasticsearch's scripting language <code>painless</code>.
  Specifically, I am trying to add 4 hours, which is 14,400 seconds.</p>
  
  <pre><code>{
    "script_fields": {
      "new_date_field": {
        "script": {
          "inline": "doc['date_field'] + 14400"
        }
      }
    }
  }
  </code></pre>
  
  <p>This throws <code>Cannot apply [+] operation to types [org.elasticsearch.index.fielddata.ScriptDocValues.Longs] and [java.lang.Integer].</code></p>
  
  <p>Thanks</p>