@@ -195,31 +195,7 @@ def clear_transforms(client)
195
195
end
196
196
197
197
def clear_indices ( client )
198
- indices = client . indices . get ( index : '_all' ) . keys . reject do |i |
199
- i . start_with? ( '.security' ) || i . start_with? ( '.watches' )
200
- end
201
- indices . each do |index |
202
- client . indices . delete_alias ( index : index , name : '*' , ignore : 404 )
203
- client . indices . delete ( index : index , ignore : 404 )
204
- end
205
- # See cat.aliases/10_basic.yml, test_index is not return in client.indices.get(index: '_all')
206
- client . indices . delete ( index : 'index_to_monitor' , ignore : 404 )
207
- client . indices . delete ( index : 'index3' , ignore : 404 )
208
- client . indices . delete ( index : 'test-close' , ignore : 404 )
209
- client . indices . delete ( index : 'test_closed' , ignore : 404 )
210
- client . indices . delete ( index : 'index' , ignore : 404 )
211
- client . indices . delete ( index : 'index2' , ignore : 404 )
212
- client . indices . delete ( index : 'test' , ignore : 404 )
213
- client . indices . delete ( index : 'test_2' , ignore : 404 )
214
- client . indices . delete ( index : 'index-2' , ignore : 404 )
215
- client . indices . delete ( index : 'test_index' , ignore : 404 )
216
- client . indices . delete ( index : 'index1' , ignore : 404 )
217
- client . indices . delete ( index : 'index_closed' , ignore : 404 )
218
- client . indices . delete ( index : 'bar' , ignore : 404 )
219
- client . indices . delete ( index : 'test_close_index' , ignore : 404 )
220
- client . indices . delete ( index : 'test_index_3' , ignore : 404 )
221
- client . indices . delete ( index : 'test_index_2' , ignore : 404 )
222
- client . indices . delete ( index : 'test-xyy' , ignore : 404 )
198
+ client . indices . delete ( index : '*' )
223
199
end
224
200
end
225
201
end
0 commit comments