use of org.opensearch.client.opensearch.indices.GetIndicesSettingsResponse in project opensearch-java by opensearch-project.
the class RequestTest method testDefaultIndexSettings.
@Test
public void testDefaultIndexSettings() throws IOException {
String index = "index-settings";
highLevelClient().index(_1 -> _1.index(index).document(new Product(5)).refresh(Refresh.True));
GetIndicesSettingsResponse settings;
settings = highLevelClient().indices().getSettings(b -> b.index(index).includeDefaults(true));
assertNotNull(settings.get(index).defaults());
settings = highLevelClient().indices().getSettings(b -> b.index(index));
assertNull(settings.get(index).defaults());
}
Aggregations