2121
2222import org .elasticsearch .action .ActionListener ;
2323import org .elasticsearch .action .admin .indices .alias .IndicesAliasesRequest ;
24- import org .elasticsearch .action .admin .indices .alias .IndicesAliasesResponse ;
2524import org .elasticsearch .action .admin .indices .alias .get .GetAliasesRequest ;
2625import org .elasticsearch .action .admin .indices .analyze .AnalyzeRequest ;
2726import org .elasticsearch .action .admin .indices .analyze .AnalyzeResponse ;
2827import org .elasticsearch .action .admin .indices .cache .clear .ClearIndicesCacheRequest ;
2928import org .elasticsearch .action .admin .indices .cache .clear .ClearIndicesCacheResponse ;
3029import org .elasticsearch .action .admin .indices .close .CloseIndexRequest ;
31- import org .elasticsearch .action .admin .indices .close .CloseIndexResponse ;
3230import org .elasticsearch .action .admin .indices .create .CreateIndexRequest ;
3331import org .elasticsearch .action .admin .indices .create .CreateIndexResponse ;
3432import org .elasticsearch .action .admin .indices .delete .DeleteIndexRequest ;
35- import org .elasticsearch .action .admin .indices .delete .DeleteIndexResponse ;
3633import org .elasticsearch .action .admin .indices .flush .FlushRequest ;
3734import org .elasticsearch .action .admin .indices .flush .FlushResponse ;
3835import org .elasticsearch .action .admin .indices .flush .SyncedFlushRequest ;
4542import org .elasticsearch .action .admin .indices .mapping .get .GetMappingsRequest ;
4643import org .elasticsearch .action .admin .indices .mapping .get .GetMappingsResponse ;
4744import org .elasticsearch .action .admin .indices .mapping .put .PutMappingRequest ;
48- import org .elasticsearch .action .admin .indices .mapping .put .PutMappingResponse ;
4945import org .elasticsearch .action .admin .indices .open .OpenIndexRequest ;
5046import org .elasticsearch .action .admin .indices .open .OpenIndexResponse ;
5147import org .elasticsearch .action .admin .indices .refresh .RefreshRequest ;
5551import org .elasticsearch .action .admin .indices .settings .get .GetSettingsRequest ;
5652import org .elasticsearch .action .admin .indices .settings .get .GetSettingsResponse ;
5753import org .elasticsearch .action .admin .indices .settings .put .UpdateSettingsRequest ;
58- import org .elasticsearch .action .admin .indices .settings .put .UpdateSettingsResponse ;
5954import org .elasticsearch .action .admin .indices .shrink .ResizeRequest ;
6055import org .elasticsearch .action .admin .indices .shrink .ResizeResponse ;
6156import org .elasticsearch .action .admin .indices .template .get .GetIndexTemplatesRequest ;
6257import org .elasticsearch .action .admin .indices .template .get .GetIndexTemplatesResponse ;
6358import org .elasticsearch .action .admin .indices .template .put .PutIndexTemplateRequest ;
64- import org .elasticsearch .action .admin .indices .template .put .PutIndexTemplateResponse ;
6559import org .elasticsearch .action .admin .indices .validate .query .ValidateQueryRequest ;
6660import org .elasticsearch .action .admin .indices .validate .query .ValidateQueryResponse ;
61+ import org .elasticsearch .action .support .master .AcknowledgedResponse ;
6762import org .elasticsearch .rest .RestStatus ;
6863
6964import java .io .IOException ;
@@ -93,9 +88,9 @@ public final class IndicesClient {
9388 * @return the response
9489 * @throws IOException in case there is a problem sending the request or parsing back the response
9590 */
96- public DeleteIndexResponse delete (DeleteIndexRequest deleteIndexRequest , RequestOptions options ) throws IOException {
91+ public AcknowledgedResponse delete (DeleteIndexRequest deleteIndexRequest , RequestOptions options ) throws IOException {
9792 return restHighLevelClient .performRequestAndParseEntity (deleteIndexRequest , RequestConverters ::deleteIndex , options ,
98- DeleteIndexResponse ::fromXContent , emptySet ());
93+ AcknowledgedResponse ::fromXContent , emptySet ());
9994 }
10095
10196 /**
@@ -106,9 +101,9 @@ public DeleteIndexResponse delete(DeleteIndexRequest deleteIndexRequest, Request
106101 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
107102 * @param listener the listener to be notified upon request completion
108103 */
109- public void deleteAsync (DeleteIndexRequest deleteIndexRequest , RequestOptions options , ActionListener <DeleteIndexResponse > listener ) {
104+ public void deleteAsync (DeleteIndexRequest deleteIndexRequest , RequestOptions options , ActionListener <AcknowledgedResponse > listener ) {
110105 restHighLevelClient .performRequestAsyncAndParseEntity (deleteIndexRequest , RequestConverters ::deleteIndex , options ,
111- DeleteIndexResponse ::fromXContent , listener , emptySet ());
106+ AcknowledgedResponse ::fromXContent , listener , emptySet ());
112107 }
113108
114109 /**
@@ -147,9 +142,9 @@ public void createAsync(CreateIndexRequest createIndexRequest, RequestOptions op
147142 * @return the response
148143 * @throws IOException in case there is a problem sending the request or parsing back the response
149144 */
150- public PutMappingResponse putMapping (PutMappingRequest putMappingRequest , RequestOptions options ) throws IOException {
145+ public AcknowledgedResponse putMapping (PutMappingRequest putMappingRequest , RequestOptions options ) throws IOException {
151146 return restHighLevelClient .performRequestAndParseEntity (putMappingRequest , RequestConverters ::putMapping , options ,
152- PutMappingResponse ::fromXContent , emptySet ());
147+ AcknowledgedResponse ::fromXContent , emptySet ());
153148 }
154149
155150 /**
@@ -160,9 +155,10 @@ public PutMappingResponse putMapping(PutMappingRequest putMappingRequest, Reques
160155 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
161156 * @param listener the listener to be notified upon request completion
162157 */
163- public void putMappingAsync (PutMappingRequest putMappingRequest , RequestOptions options , ActionListener <PutMappingResponse > listener ) {
158+ public void putMappingAsync (PutMappingRequest putMappingRequest , RequestOptions options ,
159+ ActionListener <AcknowledgedResponse > listener ) {
164160 restHighLevelClient .performRequestAsyncAndParseEntity (putMappingRequest , RequestConverters ::putMapping , options ,
165- PutMappingResponse ::fromXContent , listener , emptySet ());
161+ AcknowledgedResponse ::fromXContent , listener , emptySet ());
166162 }
167163
168164 /**
@@ -231,9 +227,9 @@ public void getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest
231227 * @return the response
232228 * @throws IOException in case there is a problem sending the request or parsing back the response
233229 */
234- public IndicesAliasesResponse updateAliases (IndicesAliasesRequest indicesAliasesRequest , RequestOptions options ) throws IOException {
230+ public AcknowledgedResponse updateAliases (IndicesAliasesRequest indicesAliasesRequest , RequestOptions options ) throws IOException {
235231 return restHighLevelClient .performRequestAndParseEntity (indicesAliasesRequest , RequestConverters ::updateAliases , options ,
236- IndicesAliasesResponse ::fromXContent , emptySet ());
232+ AcknowledgedResponse ::fromXContent , emptySet ());
237233 }
238234
239235 /**
@@ -245,9 +241,9 @@ public IndicesAliasesResponse updateAliases(IndicesAliasesRequest indicesAliases
245241 * @param listener the listener to be notified upon request completion
246242 */
247243 public void updateAliasesAsync (IndicesAliasesRequest indicesAliasesRequest , RequestOptions options ,
248- ActionListener <IndicesAliasesResponse > listener ) {
244+ ActionListener <AcknowledgedResponse > listener ) {
249245 restHighLevelClient .performRequestAsyncAndParseEntity (indicesAliasesRequest , RequestConverters ::updateAliases , options ,
250- IndicesAliasesResponse ::fromXContent , listener , emptySet ());
246+ AcknowledgedResponse ::fromXContent , listener , emptySet ());
251247 }
252248
253249 /**
@@ -286,9 +282,9 @@ public void openAsync(OpenIndexRequest openIndexRequest, RequestOptions options,
286282 * @return the response
287283 * @throws IOException in case there is a problem sending the request or parsing back the response
288284 */
289- public CloseIndexResponse close (CloseIndexRequest closeIndexRequest , RequestOptions options ) throws IOException {
285+ public AcknowledgedResponse close (CloseIndexRequest closeIndexRequest , RequestOptions options ) throws IOException {
290286 return restHighLevelClient .performRequestAndParseEntity (closeIndexRequest , RequestConverters ::closeIndex , options ,
291- CloseIndexResponse ::fromXContent , emptySet ());
287+ AcknowledgedResponse ::fromXContent , emptySet ());
292288 }
293289
294290 /**
@@ -299,9 +295,9 @@ public CloseIndexResponse close(CloseIndexRequest closeIndexRequest, RequestOpti
299295 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
300296 * @param listener the listener to be notified upon request completion
301297 */
302- public void closeAsync (CloseIndexRequest closeIndexRequest , RequestOptions options , ActionListener <CloseIndexResponse > listener ) {
298+ public void closeAsync (CloseIndexRequest closeIndexRequest , RequestOptions options , ActionListener <AcknowledgedResponse > listener ) {
303299 restHighLevelClient .performRequestAsyncAndParseEntity (closeIndexRequest , RequestConverters ::closeIndex , options ,
304- CloseIndexResponse ::fromXContent , listener , emptySet ());
300+ AcknowledgedResponse ::fromXContent , listener , emptySet ());
305301 }
306302
307303
@@ -706,9 +702,9 @@ public void getAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions op
706702 * @return the response
707703 * @throws IOException in case there is a problem sending the request or parsing back the response
708704 */
709- public UpdateSettingsResponse putSettings (UpdateSettingsRequest updateSettingsRequest , RequestOptions options ) throws IOException {
705+ public AcknowledgedResponse putSettings (UpdateSettingsRequest updateSettingsRequest , RequestOptions options ) throws IOException {
710706 return restHighLevelClient .performRequestAndParseEntity (updateSettingsRequest , RequestConverters ::indexPutSettings , options ,
711- UpdateSettingsResponse ::fromXContent , emptySet ());
707+ AcknowledgedResponse ::fromXContent , emptySet ());
712708 }
713709
714710 /**
@@ -720,9 +716,9 @@ public UpdateSettingsResponse putSettings(UpdateSettingsRequest updateSettingsRe
720716 * @param listener the listener to be notified upon request completion
721717 */
722718 public void putSettingsAsync (UpdateSettingsRequest updateSettingsRequest , RequestOptions options ,
723- ActionListener <UpdateSettingsResponse > listener ) {
719+ ActionListener <AcknowledgedResponse > listener ) {
724720 restHighLevelClient .performRequestAsyncAndParseEntity (updateSettingsRequest , RequestConverters ::indexPutSettings , options ,
725- UpdateSettingsResponse ::fromXContent , listener , emptySet ());
721+ AcknowledgedResponse ::fromXContent , listener , emptySet ());
726722 }
727723
728724 /**
@@ -734,10 +730,10 @@ public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, Reques
734730 * @return the response
735731 * @throws IOException in case there is a problem sending the request or parsing back the response
736732 */
737- public PutIndexTemplateResponse putTemplate (PutIndexTemplateRequest putIndexTemplateRequest ,
738- RequestOptions options ) throws IOException {
733+ public AcknowledgedResponse putTemplate (PutIndexTemplateRequest putIndexTemplateRequest ,
734+ RequestOptions options ) throws IOException {
739735 return restHighLevelClient .performRequestAndParseEntity (putIndexTemplateRequest , RequestConverters ::putTemplate , options ,
740- PutIndexTemplateResponse ::fromXContent , emptySet ());
736+ AcknowledgedResponse ::fromXContent , emptySet ());
741737 }
742738
743739 /**
@@ -749,9 +745,9 @@ public PutIndexTemplateResponse putTemplate(PutIndexTemplateRequest putIndexTemp
749745 * @param listener the listener to be notified upon request completion
750746 */
751747 public void putTemplateAsync (PutIndexTemplateRequest putIndexTemplateRequest , RequestOptions options ,
752- ActionListener <PutIndexTemplateResponse > listener ) {
748+ ActionListener <AcknowledgedResponse > listener ) {
753749 restHighLevelClient .performRequestAsyncAndParseEntity (putIndexTemplateRequest , RequestConverters ::putTemplate , options ,
754- PutIndexTemplateResponse ::fromXContent , listener , emptySet ());
750+ AcknowledgedResponse ::fromXContent , listener , emptySet ());
755751 }
756752
757753 /**
0 commit comments