set source config as required

Fix for LOGSTASH-1581 with a solution consistent with json filter.
Comes from elasticsearch/logstash#1255