Kibana-4.6.4 have an issues with datatables where fields is containing string values

The best way would be to create an index template, which defines the mappings when the index is first created. The template you linked to is an example, though from a very old version of Logstash. This may be a better starting point.