3434import org .elasticsearch .action .admin .indices .flush .SyncedFlushRequest ;
3535import org .elasticsearch .action .admin .indices .forcemerge .ForceMergeRequest ;
3636import org .elasticsearch .action .admin .indices .forcemerge .ForceMergeResponse ;
37- import org .elasticsearch .action .admin .indices .get .GetIndexRequest ;
38- import org .elasticsearch .action .admin .indices .get .GetIndexResponse ;
39- import org .elasticsearch .client .indices .GetFieldMappingsRequest ;
40- import org .elasticsearch .client .indices .GetFieldMappingsResponse ;
4137import org .elasticsearch .action .admin .indices .open .OpenIndexRequest ;
4238import org .elasticsearch .action .admin .indices .open .OpenIndexResponse ;
4339import org .elasticsearch .action .admin .indices .refresh .RefreshRequest ;
4440import org .elasticsearch .action .admin .indices .refresh .RefreshResponse ;
45- import org .elasticsearch .action .admin .indices .rollover .RolloverRequest ;
46- import org .elasticsearch .action .admin .indices .rollover .RolloverResponse ;
4741import org .elasticsearch .action .admin .indices .settings .get .GetSettingsRequest ;
4842import org .elasticsearch .action .admin .indices .settings .get .GetSettingsResponse ;
4943import org .elasticsearch .action .admin .indices .settings .put .UpdateSettingsRequest ;
5751import org .elasticsearch .client .indices .CreateIndexRequest ;
5852import org .elasticsearch .client .indices .CreateIndexResponse ;
5953import org .elasticsearch .client .indices .FreezeIndexRequest ;
54+ import org .elasticsearch .client .indices .GetFieldMappingsRequest ;
55+ import org .elasticsearch .client .indices .GetFieldMappingsResponse ;
56+ import org .elasticsearch .client .indices .GetIndexRequest ;
57+ import org .elasticsearch .client .indices .GetIndexResponse ;
6058import org .elasticsearch .client .indices .GetIndexTemplatesRequest ;
6159import org .elasticsearch .client .indices .GetMappingsRequest ;
6260import org .elasticsearch .client .indices .GetMappingsResponse ;
6563import org .elasticsearch .client .indices .PutIndexTemplateRequest ;
6664import org .elasticsearch .client .indices .PutMappingRequest ;
6765import org .elasticsearch .client .indices .UnfreezeIndexRequest ;
66+ import org .elasticsearch .client .indices .rollover .RolloverRequest ;
67+ import org .elasticsearch .client .indices .rollover .RolloverResponse ;
6868import org .elasticsearch .rest .RestStatus ;
6969
7070import java .io .IOException ;
@@ -901,6 +901,41 @@ public void getAsync(GetIndexRequest getIndexRequest, RequestOptions options,
901901 GetIndexResponse ::fromXContent , listener , emptySet ());
902902 }
903903
904+ /**
905+ * Retrieve information about one or more indexes
906+ * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html">
907+ * Indices Get Index API on elastic.co</a>
908+ * @param getIndexRequest the request
909+ * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
910+ * @return the response
911+ * @throws IOException in case there is a problem sending the request or parsing back the response
912+ * @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
913+ * {@link #get(GetIndexRequest, RequestOptions)} should be used instead, which accepts a new request object.
914+ */
915+ @ Deprecated
916+ public org .elasticsearch .action .admin .indices .get .GetIndexResponse get (
917+ org .elasticsearch .action .admin .indices .get .GetIndexRequest getIndexRequest , RequestOptions options ) throws IOException {
918+ return restHighLevelClient .performRequestAndParseEntity (getIndexRequest , IndicesRequestConverters ::getIndex , options ,
919+ org .elasticsearch .action .admin .indices .get .GetIndexResponse ::fromXContent , emptySet ());
920+ }
921+
922+ /**
923+ * Retrieve information about one or more indexes
924+ * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html">
925+ * Indices Get Index API on elastic.co</a>
926+ * @param getIndexRequest the request
927+ * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
928+ * @param listener the listener to be notified upon request completion
929+ * @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
930+ * {@link #getAsync(GetIndexRequest, RequestOptions, ActionListener)} should be used instead, which accepts a new request object.
931+ */
932+ @ Deprecated
933+ public void getAsync (org .elasticsearch .action .admin .indices .get .GetIndexRequest getIndexRequest , RequestOptions options ,
934+ ActionListener <org .elasticsearch .action .admin .indices .get .GetIndexResponse > listener ) {
935+ restHighLevelClient .performRequestAsyncAndParseEntity (getIndexRequest , IndicesRequestConverters ::getIndex , options ,
936+ org .elasticsearch .action .admin .indices .get .GetIndexResponse ::fromXContent , listener , emptySet ());
937+ }
938+
904939 /**
905940 * Force merge one or more indices using the Force Merge API.
906941 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html">
@@ -1058,15 +1093,38 @@ public boolean exists(GetIndexRequest request, RequestOptions options) throws IO
10581093 );
10591094 }
10601095
1096+ /**
1097+ * Checks if the index (indices) exists or not.
1098+ * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
1099+ * Indices Exists API on elastic.co</a>
1100+ * @param request the request
1101+ * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1102+ * @return the response
1103+ * @throws IOException in case there is a problem sending the request
1104+ * @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
1105+ * {@link #exists(GetIndexRequest, RequestOptions)} should be used instead, which accepts a new request object.
1106+ */
1107+ @ Deprecated
1108+ public boolean exists (org .elasticsearch .action .admin .indices .get .GetIndexRequest request , RequestOptions options ) throws IOException {
1109+ return restHighLevelClient .performRequest (
1110+ request ,
1111+ IndicesRequestConverters ::indicesExist ,
1112+ options ,
1113+ RestHighLevelClient ::convertExistsResponse ,
1114+ Collections .emptySet ()
1115+ );
1116+ }
1117+
10611118 /**
10621119 * Checks if the index (indices) exists or not.
10631120 * <p>
10641121 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
10651122 * Indices Exists API on elastic.co</a>
1066- * @deprecated Prefer {@link #exists(GetIndexRequest, RequestOptions)}
1123+ * @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
1124+ * {@link #exists(GetIndexRequest, RequestOptions)} should be used instead, which accepts a new request object.
10671125 */
10681126 @ Deprecated
1069- public boolean exists (GetIndexRequest request , Header ... headers ) throws IOException {
1127+ public boolean exists (org . elasticsearch . action . admin . indices . get . GetIndexRequest request , Header ... headers ) throws IOException {
10701128 return restHighLevelClient .performRequest (
10711129 request ,
10721130 IndicesRequestConverters ::indicesExist ,
@@ -1095,15 +1153,40 @@ public void existsAsync(GetIndexRequest request, RequestOptions options, ActionL
10951153 );
10961154 }
10971155
1156+ /**
1157+ * Asynchronously checks if the index (indices) exists or not.
1158+ * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
1159+ * Indices Exists API on elastic.co</a>
1160+ * @param request the request
1161+ * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1162+ * @param listener the listener to be notified upon request completion
1163+ * @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
1164+ * {@link #existsAsync(GetIndexRequest, RequestOptions, ActionListener)} should be used instead, which accepts a new request object.
1165+ */
1166+ @ Deprecated
1167+ public void existsAsync (org .elasticsearch .action .admin .indices .get .GetIndexRequest request , RequestOptions options ,
1168+ ActionListener <Boolean > listener ) {
1169+ restHighLevelClient .performRequestAsync (
1170+ request ,
1171+ IndicesRequestConverters ::indicesExist ,
1172+ options ,
1173+ RestHighLevelClient ::convertExistsResponse ,
1174+ listener ,
1175+ Collections .emptySet ()
1176+ );
1177+ }
1178+
10981179 /**
10991180 * Asynchronously checks if the index (indices) exists or not.
11001181 * <p>
11011182 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
11021183 * Indices Exists API on elastic.co</a>
1103- * @deprecated Prefer {@link #existsAsync(GetIndexRequest, RequestOptions, ActionListener)}
1184+ * @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
1185+ * {@link #existsAsync(GetIndexRequest, RequestOptions, ActionListener)} should be used instead, which accepts a new request object.
11041186 */
11051187 @ Deprecated
1106- public void existsAsync (GetIndexRequest request , ActionListener <Boolean > listener , Header ... headers ) {
1188+ public void existsAsync (org .elasticsearch .action .admin .indices .get .GetIndexRequest request , ActionListener <Boolean > listener ,
1189+ Header ... headers ) {
11071190 restHighLevelClient .performRequestAsync (
11081191 request ,
11091192 IndicesRequestConverters ::indicesExist ,
@@ -1234,17 +1317,54 @@ public RolloverResponse rollover(RolloverRequest rolloverRequest, RequestOptions
12341317 RolloverResponse ::fromXContent , emptySet ());
12351318 }
12361319
1320+ /**
1321+ * Asynchronously rolls over an index using the Rollover Index API.
1322+ * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
1323+ * Rollover Index API on elastic.co</a>
1324+ * @param rolloverRequest the request
1325+ * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1326+ * @param listener the listener to be notified upon request completion
1327+ */
1328+ public void rolloverAsync (RolloverRequest rolloverRequest , RequestOptions options , ActionListener <RolloverResponse > listener ) {
1329+ restHighLevelClient .performRequestAsyncAndParseEntity (rolloverRequest , IndicesRequestConverters ::rollover , options ,
1330+ RolloverResponse ::fromXContent , listener , emptySet ());
1331+ }
1332+
1333+ /**
1334+ * Rolls over an index using the Rollover Index API.
1335+ * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
1336+ * Rollover Index API on elastic.co</a>
1337+ * @param rolloverRequest the request
1338+ * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1339+ * @return the response
1340+ * @throws IOException in case there is a problem sending the request or parsing back the response
1341+ *
1342+ * @deprecated This method uses deprecated request and response objects.
1343+ * The method {@link #rollover(RolloverRequest, RequestOptions)} should be used instead, which accepts a new request object.
1344+ */
1345+ @ Deprecated
1346+ public org .elasticsearch .action .admin .indices .rollover .RolloverResponse rollover (
1347+ org .elasticsearch .action .admin .indices .rollover .RolloverRequest rolloverRequest ,
1348+ RequestOptions options ) throws IOException {
1349+ return restHighLevelClient .performRequestAndParseEntity (rolloverRequest , IndicesRequestConverters ::rollover , options ,
1350+ org .elasticsearch .action .admin .indices .rollover .RolloverResponse ::fromXContent , emptySet ());
1351+ }
1352+
12371353 /**
12381354 * Rolls over an index using the Rollover Index API.
12391355 * <p>
12401356 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
12411357 * Rollover Index API on elastic.co</a>
1242- * @deprecated Prefer {@link #rollover(RolloverRequest, RequestOptions)}
1358+ *
1359+ * @deprecated This method uses deprecated request and response objects.
1360+ * The method {@link #rollover(RolloverRequest, RequestOptions)} should be used instead, which accepts a new request object.
12431361 */
12441362 @ Deprecated
1245- public RolloverResponse rollover (RolloverRequest rolloverRequest , Header ... headers ) throws IOException {
1363+ public org .elasticsearch .action .admin .indices .rollover .RolloverResponse rollover (
1364+ org .elasticsearch .action .admin .indices .rollover .RolloverRequest rolloverRequest ,
1365+ Header ... headers ) throws IOException {
12461366 return restHighLevelClient .performRequestAndParseEntity (rolloverRequest , IndicesRequestConverters ::rollover ,
1247- RolloverResponse ::fromXContent , emptySet (), headers );
1367+ org . elasticsearch . action . admin . indices . rollover . RolloverResponse ::fromXContent , emptySet (), headers );
12481368 }
12491369
12501370 /**
@@ -1254,23 +1374,33 @@ public RolloverResponse rollover(RolloverRequest rolloverRequest, Header... head
12541374 * @param rolloverRequest the request
12551375 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
12561376 * @param listener the listener to be notified upon request completion
1377+ *
1378+ * @deprecated This method uses deprecated request and response objects.
1379+ * The method {@link #rolloverAsync(RolloverRequest, RequestOptions, ActionListener)} should be used instead, which
1380+ * accepts a new request object.
12571381 */
1258- public void rolloverAsync (RolloverRequest rolloverRequest , RequestOptions options , ActionListener <RolloverResponse > listener ) {
1382+ @ Deprecated
1383+ public void rolloverAsync (org .elasticsearch .action .admin .indices .rollover .RolloverRequest rolloverRequest ,
1384+ RequestOptions options , ActionListener <org .elasticsearch .action .admin .indices .rollover .RolloverResponse > listener ) {
12591385 restHighLevelClient .performRequestAsyncAndParseEntity (rolloverRequest , IndicesRequestConverters ::rollover , options ,
1260- RolloverResponse ::fromXContent , listener , emptySet ());
1386+ org . elasticsearch . action . admin . indices . rollover . RolloverResponse ::fromXContent , listener , emptySet ());
12611387 }
12621388
12631389 /**
12641390 * Asynchronously rolls over an index using the Rollover Index API.
12651391 * <p>
12661392 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
12671393 * Rollover Index API on elastic.co</a>
1268- * @deprecated Prefer {@link #rolloverAsync(RolloverRequest, RequestOptions, ActionListener)}
1394+ *
1395+ * @deprecated This method uses deprecated request and response objects.
1396+ * The method {@link #rolloverAsync(RolloverRequest, RequestOptions, ActionListener)} should be used instead, which
1397+ * accepts a new request object.
12691398 */
12701399 @ Deprecated
1271- public void rolloverAsync (RolloverRequest rolloverRequest , ActionListener <RolloverResponse > listener , Header ... headers ) {
1400+ public void rolloverAsync (org .elasticsearch .action .admin .indices .rollover .RolloverRequest rolloverRequest ,
1401+ ActionListener <org .elasticsearch .action .admin .indices .rollover .RolloverResponse > listener , Header ... headers ) {
12721402 restHighLevelClient .performRequestAsyncAndParseEntity (rolloverRequest , IndicesRequestConverters ::rollover ,
1273- RolloverResponse ::fromXContent , listener , emptySet (), headers );
1403+ org . elasticsearch . action . admin . indices . rollover . RolloverResponse ::fromXContent , listener , emptySet (), headers );
12741404 }
12751405
12761406 /**
0 commit comments