Display concurrency in data on Kibana

I also tried this but it doesn't remove the field parameter as promised. With the following json input:

{
"interval":"minute",
"script": "start = doc['recordStart'].value; duration = doc['recordDuration'].value; l = []; for (long i = 0; i < duration; i += 60000) { l.add(start + i); }; return l;",
"field":null,
"lang": "groovy"

}

I get the following request

 "aggs": {
"2": {
  "date_histogram": {
    "field": null,
    "interval": "minute",
    "pre_zone": "+02:00",
    "pre_zone_adjust_large_interval": true,
    "min_doc_count": 1,
    "extended_bounds": {
      "min": 1366292067758,
      "max": 1433416997446
    },
    "script": "start = doc['recordStart'].value; duration = doc['recordDuration'].value; l = []; for (long i = 0; i < duration; i += 60000) { l.add(start + i); }; return l;",
    "lang": "groovy"
  }
}

}

Which gives the following error

Error: Request to Elasticsearch failed: (big part removed because message was too long)

Failure [Unexpected token VALUE_NULL in [2].]]; }]"}
at http://localhost:5601/index.js?_b=7489:43092:38
at Function.Promise.try (http://localhost:5601/index.js?_b=7489:46434:26)
at http://localhost:5601/index.js?_b=7489:46412:27
at Array.map (native)
at Function.Promise.map (http://localhost:5601/index.js?_b=7489:46411:30)
at callResponseHandlers (http://localhost:5601/index.js?_b=7489:43064:22)
at http://localhost:5601/index.js?_b=7489:43182:16
at wrappedCallback (http://localhost:5601/index.js?_b=7489:20893:81)
at wrappedCallback (http://localhost:5601/index.js?_b=7489:20893:81)
at http://localhost:5601/index.js?_b=7489:20979:26