@SuppressWarnings("unchecked")
@Override
public void init(Map<String, Object> settings) throws SettingsException {
if (settings == null) {
throw new SettingsException("'settings' section is not defined for preprocessor " + name);
}
fieldSource = XContentMapValues.nodeStringValue(settings.get(CFG_SOURCE_FIELD), null);
validateConfigurationStringNotEmpty(fieldSource, CFG_SOURCE_FIELD);
fieldTarget = XContentMapValues.nodeStringValue(settings.get(CFG_TARGET_FIELD), null);
validateConfigurationStringNotEmpty(fieldTarget, CFG_TARGET_FIELD);