use of org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest in project elasticsearch by elastic.
the class IndicesRequestIT method testUpdateSettings.
public void testUpdateSettings() {
interceptTransportActions(UpdateSettingsAction.NAME);
UpdateSettingsRequest updateSettingsRequest = new UpdateSettingsRequest(randomIndicesOrAliases()).settings(Settings.builder().put("refresh_interval", -1));
internalCluster().coordOnlyNodeClient().admin().indices().updateSettings(updateSettingsRequest).actionGet();
clearInterceptedActions();
assertSameIndices(updateSettingsRequest, UpdateSettingsAction.NAME);
}
use of org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest in project graylog2-server by Graylog2.
the class Indices method reopenIndex.
public void reopenIndex(String index) {
// Mark this index as re-opened. It will never be touched by retention.
UpdateSettingsRequest settings = new UpdateSettingsRequest(index);
settings.settings(reopenIndexSettings());
c.admin().indices().updateSettings(settings).actionGet();
// Open index.
c.admin().indices().open(new OpenIndexRequest(index)).actionGet();
}
Aggregations