make sure headers etc. are passed over to inner index and delete requests in put/delete pipeline
This commit is contained in:
parent
588de6ccff
commit
1dfe6f6dcf
|
@ -26,17 +26,12 @@ import org.elasticsearch.action.delete.TransportDeleteAction;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.HandledTransportAction;
|
import org.elasticsearch.action.support.HandledTransportAction;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.common.bytes.BytesReference;
|
|
||||||
import org.elasticsearch.common.inject.Inject;
|
import org.elasticsearch.common.inject.Inject;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.plugin.ingest.PipelineStore;
|
import org.elasticsearch.plugin.ingest.PipelineStore;
|
||||||
import org.elasticsearch.threadpool.ThreadPool;
|
import org.elasticsearch.threadpool.ThreadPool;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class DeletePipelineTransportAction extends HandledTransportAction<DeletePipelineRequest, DeletePipelineResponse> {
|
public class DeletePipelineTransportAction extends HandledTransportAction<DeletePipelineRequest, DeletePipelineResponse> {
|
||||||
|
|
||||||
private final TransportDeleteAction deleteAction;
|
private final TransportDeleteAction deleteAction;
|
||||||
|
@ -49,7 +44,7 @@ public class DeletePipelineTransportAction extends HandledTransportAction<Delete
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doExecute(DeletePipelineRequest request, ActionListener<DeletePipelineResponse> listener) {
|
protected void doExecute(DeletePipelineRequest request, ActionListener<DeletePipelineResponse> listener) {
|
||||||
DeleteRequest deleteRequest = new DeleteRequest();
|
DeleteRequest deleteRequest = new DeleteRequest(request);
|
||||||
deleteRequest.index(PipelineStore.INDEX);
|
deleteRequest.index(PipelineStore.INDEX);
|
||||||
deleteRequest.type(PipelineStore.TYPE);
|
deleteRequest.type(PipelineStore.TYPE);
|
||||||
deleteRequest.id(request.id());
|
deleteRequest.id(request.id());
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class PutPipelineTransportAction extends HandledTransportAction<PutPipeli
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexRequest indexRequest = new IndexRequest();
|
IndexRequest indexRequest = new IndexRequest(request);
|
||||||
indexRequest.index(PipelineStore.INDEX);
|
indexRequest.index(PipelineStore.INDEX);
|
||||||
indexRequest.type(PipelineStore.TYPE);
|
indexRequest.type(PipelineStore.TYPE);
|
||||||
indexRequest.id(request.id());
|
indexRequest.id(request.id());
|
||||||
|
|
Loading…
Reference in New Issue