// Overwrite from a custom ElasticSearch config file.
final String esConfigFilePath = conf.getElasticSearchConfigFile();
if (esConfigFilePath != null) {
try {
final byte[] esSettings = Files.readAllBytes(Paths.get(esConfigFilePath));
settings.putAll(new YamlSettingsLoader().load(esSettings));
} catch (IOException e) {
LOG.warn("Cannot read Elasticsearch configuration.");
}
}