Search in sources :

Example 16 with GetSettingsRequest

use of org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest in project spring-data-elasticsearch by spring-projects.

the class RestIndexTemplate method doGetSettings.

@Override
protected Settings doGetSettings(IndexCoordinates index, boolean includeDefaults) {
    Assert.notNull(index, "index must not be null");
    GetSettingsRequest getSettingsRequest = requestFactory.getSettingsRequest(index, includeDefaults);
    GetSettingsResponse response = restTemplate.execute(client -> // 
    client.indices().getSettings(getSettingsRequest, RequestOptions.DEFAULT));
    return ResponseConverter.fromSettingsResponse(response, getSettingsRequest.indices()[0]);
}
Also used : GetSettingsRequest(org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest) GetSettingsResponse(org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse)

Aggregations

GetSettingsRequest (org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest)15 GetSettingsResponse (org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse)8 IOException (java.io.IOException)3 DeleteIndexRequest (org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest)3 DocWriteRequest (org.elasticsearch.action.DocWriteRequest)2 IndicesAliasesRequest (org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest)2 GetAliasesRequest (org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest)2 CloseIndexRequest (org.elasticsearch.action.admin.indices.close.CloseIndexRequest)2 CreateIndexRequest (org.elasticsearch.action.admin.indices.create.CreateIndexRequest)2 FlushRequest (org.elasticsearch.action.admin.indices.flush.FlushRequest)2 GetIndexRequest (org.elasticsearch.action.admin.indices.get.GetIndexRequest)2 GetMappingsRequest (org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest)2 PutMappingRequest (org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest)2 OpenIndexRequest (org.elasticsearch.action.admin.indices.open.OpenIndexRequest)2 RefreshRequest (org.elasticsearch.action.admin.indices.refresh.RefreshRequest)2 DeleteIndexTemplateRequest (org.elasticsearch.action.admin.indices.template.delete.DeleteIndexTemplateRequest)2 BulkRequest (org.elasticsearch.action.bulk.BulkRequest)2 FieldCapabilitiesRequest (org.elasticsearch.action.fieldcaps.FieldCapabilitiesRequest)2 MultiGetRequest (org.elasticsearch.action.get.MultiGetRequest)2 ObjectObjectCursor (com.carrotsearch.hppc.cursors.ObjectObjectCursor)1