public function mergeSettings($index_name, $settings)
{
$onlineSettings = array();
try {
$onlineSettings = $this->getIndex($index_name)->getSettings();
} catch (\Exception $e) {
}
$removes = array('slaves');
foreach ($removes as $remove) {
if (isset($onlineSettings[$remove])) {
unset($onlineSettings[$remove]);
}
}
foreach ($settings as $key => $value) {
$onlineSettings[$key] = $value;
}
return $onlineSettings;
}