Hour Scripted Field

return doc['@timestamp'].value.getHour();

This works for me.