use of co.elastic.clients.elasticsearch.indices.GetIndicesSettingsResponse in project elasticsearch-java by elastic.
the class RequestTest method testDefaultIndexSettings.
@Test
public void testDefaultIndexSettings() throws IOException {
// https://github.com/elastic/elasticsearch-java/issues/46
String index = "index-settings";
client.index(_1 -> _1.index(index).document(new Product(5)).refresh(Refresh.True));
GetIndicesSettingsResponse settings;
settings = client.indices().getSettings(b -> b.index(index).includeDefaults(true));
assertNotNull(settings.get(index).defaults());
settings = client.indices().getSettings(b -> b.index(index));
assertNull(settings.get(index).defaults());
}
Aggregations