|
32 | 32 | import co.elastic.clients.elasticsearch._types.mapping.TypeMapping;
|
33 | 33 | import co.elastic.clients.elasticsearch._types.query_dsl.Like;
|
34 | 34 | import co.elastic.clients.elasticsearch.cluster.HealthRequest;
|
35 |
| -import co.elastic.clients.elasticsearch.core.*; |
| 35 | +import co.elastic.clients.elasticsearch.core.BulkRequest; |
| 36 | +import co.elastic.clients.elasticsearch.core.DeleteByQueryRequest; |
| 37 | +import co.elastic.clients.elasticsearch.core.DeleteRequest; |
| 38 | +import co.elastic.clients.elasticsearch.core.GetRequest; |
| 39 | +import co.elastic.clients.elasticsearch.core.IndexRequest; |
| 40 | +import co.elastic.clients.elasticsearch.core.MgetRequest; |
| 41 | +import co.elastic.clients.elasticsearch.core.MsearchRequest; |
| 42 | +import co.elastic.clients.elasticsearch.core.SearchRequest; |
| 43 | +import co.elastic.clients.elasticsearch.core.UpdateByQueryRequest; |
| 44 | +import co.elastic.clients.elasticsearch.core.UpdateRequest; |
36 | 45 | import co.elastic.clients.elasticsearch.core.bulk.BulkOperation;
|
37 | 46 | import co.elastic.clients.elasticsearch.core.bulk.CreateOperation;
|
38 | 47 | import co.elastic.clients.elasticsearch.core.bulk.IndexOperation;
|
|
42 | 51 | import co.elastic.clients.elasticsearch.core.search.Rescore;
|
43 | 52 | import co.elastic.clients.elasticsearch.core.search.SourceConfig;
|
44 | 53 | import co.elastic.clients.elasticsearch.indices.*;
|
45 |
| -import co.elastic.clients.elasticsearch.indices.ExistsRequest; |
46 | 54 | import co.elastic.clients.elasticsearch.indices.update_aliases.Action;
|
47 | 55 | import co.elastic.clients.json.JsonData;
|
48 | 56 | import co.elastic.clients.json.JsonpDeserializer;
|
@@ -820,7 +828,11 @@ public co.elastic.clients.elasticsearch.core.ReindexRequest reindex(ReindexReque
|
820 | 828 | .refresh(reindexRequest.getRefresh()) //
|
821 | 829 | .requireAlias(reindexRequest.getRequireAlias()) //
|
822 | 830 | .requestsPerSecond(reindexRequest.getRequestsPerSecond()) //
|
823 |
| - .slices(reindexRequest.getSlices()); |
| 831 | + ; |
| 832 | + |
| 833 | + if (reindexRequest.getSlices() != null) { |
| 834 | + builder.slices(sb -> sb.value(reindexRequest.getSlices().intValue())); |
| 835 | + } |
824 | 836 |
|
825 | 837 | return builder.build();
|
826 | 838 | }
|
@@ -963,9 +975,12 @@ public UpdateByQueryRequest documentUpdateByQueryRequest(UpdateQuery updateQuery
|
963 | 975 | .pipeline(updateQuery.getPipeline()) //
|
964 | 976 | .requestsPerSecond(
|
965 | 977 | updateQuery.getRequestsPerSecond() != null ? updateQuery.getRequestsPerSecond().longValue() : null) //
|
966 |
| - .slices(updateQuery.getSlices() != null ? Long.valueOf(updateQuery.getSlices()) : null) // |
967 | 978 | ;
|
968 | 979 |
|
| 980 | + if (updateQuery.getSlices() != null) { |
| 981 | + ub.slices(sb -> sb.value(updateQuery.getSlices() != null ? updateQuery.getSlices() : null)); |
| 982 | + } |
| 983 | + |
969 | 984 | if (updateQuery.getAbortOnVersionConflict() != null) {
|
970 | 985 | ub.conflicts(updateQuery.getAbortOnVersionConflict() ? Conflicts.Abort : Conflicts.Proceed);
|
971 | 986 | }
|
|
0 commit comments