settings.setProperty(ConfigurationOptions.ES_WRITE_OPERATION, operation);
return BulkCommands.create(settings);
}
private Settings settings() {
Settings set = new TestSettings();
InitializationUtils.setValueWriterIfNotSet(set, JdkValueWriter.class, null);
InitializationUtils.setFieldExtractorIfNotSet(set, MapFieldExtractor.class, null);
set.setResourceWrite("foo/bar");
if (isUpdateOp()) {
set.setProperty(ConfigurationOptions.ES_MAPPING_ID, "<2>");
}
return set;
}