|
@@ -21,7 +21,6 @@ package org.elasticsearch.index.reindex;
|
|
|
|
|
|
import org.elasticsearch.action.ActionRequestValidationException;
|
|
|
import org.elasticsearch.action.CompositeIndicesRequest;
|
|
|
-import org.elasticsearch.action.IndicesRequest;
|
|
|
import org.elasticsearch.action.index.IndexRequest;
|
|
|
import org.elasticsearch.action.search.SearchRequest;
|
|
|
import org.elasticsearch.common.io.stream.StreamInput;
|
|
@@ -31,11 +30,7 @@ import org.elasticsearch.index.reindex.remote.RemoteInfo;
|
|
|
import org.elasticsearch.tasks.TaskId;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
|
|
|
-import static java.util.Collections.singletonList;
|
|
|
-import static java.util.Collections.unmodifiableList;
|
|
|
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|
|
import static org.elasticsearch.index.VersionType.INTERNAL;
|
|
|
|
|
@@ -165,23 +160,4 @@ public class ReindexRequest extends AbstractBulkIndexByScrollRequest<ReindexRequ
|
|
|
}
|
|
|
return b.toString();
|
|
|
}
|
|
|
-
|
|
|
- // CompositeIndicesRequest implementation so plugins can reason about the request. This is really just a best effort thing.
|
|
|
- /**
|
|
|
- * Accessor to get the underlying {@link IndicesRequest}s that this request wraps. Note that this method is <strong>not
|
|
|
- * accurate</strong> since it returns a prototype {@link IndexRequest} and not the actual requests that will be issued as part of the
|
|
|
- * execution of this request. Additionally, scripts can modify the underlying {@link IndexRequest} and change values such as the index,
|
|
|
- * type, {@link org.elasticsearch.action.support.IndicesOptions}. In short - only use this for very course reasoning about the request.
|
|
|
- *
|
|
|
- * @return a list comprising of the {@link SearchRequest} and the prototype {@link IndexRequest}
|
|
|
- */
|
|
|
- @Override
|
|
|
- public List<? extends IndicesRequest> subRequests() {
|
|
|
- assert getSearchRequest() != null;
|
|
|
- assert getDestination() != null;
|
|
|
- if (remoteInfo != null) {
|
|
|
- return singletonList(getDestination());
|
|
|
- }
|
|
|
- return unmodifiableList(Arrays.asList(getSearchRequest(), getDestination()));
|
|
|
- }
|
|
|
}
|