Skip to content

Commit a81d1c9

Browse files
authored
Merge pull request #1164 from Tobion/patch-2
Fix resetIndexType on ES 1.x
2 parents 70ea4d0 + c0b643a commit a81d1c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Index/Resetter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ public function resetIndexType($indexName, $typeName)
136136
}
137137

138138
if (!empty($settings)) {
139-
unset($settings['number_of_shards']);
139+
unset($settings['number_of_shards'], $settings['index']['number_of_shards']);
140+
unset($settings['number_of_replicas'], $settings['index']['number_of_replicas']);
140141
$index->close();
141142
$index->setSettings($settings);
142143
$index->open();

0 commit comments

Comments
 (0)