make sure headers etc. are passed over to inner index and delete requests in put/delete pipeline

This commit is contained in:
javanna 2015-11-06 19:21:30 +01:00 committed by Luca Cavanna
parent 588de6ccff
commit 1dfe6f6dcf
2 changed files with 2 additions and 7 deletions

View File

@ -26,17 +26,12 @@ import org.elasticsearch.action.delete.TransportDeleteAction;
import org.elasticsearch.action.support.ActionFilters;
import org.elasticsearch.action.support.HandledTransportAction;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugin.ingest.PipelineStore;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DeletePipelineTransportAction extends HandledTransportAction<DeletePipelineRequest, DeletePipelineResponse> {
private final TransportDeleteAction deleteAction;
@ -49,7 +44,7 @@ public class DeletePipelineTransportAction extends HandledTransportAction<Delete
@Override
protected void doExecute(DeletePipelineRequest request, ActionListener<DeletePipelineResponse> listener) {
DeleteRequest deleteRequest = new DeleteRequest();
DeleteRequest deleteRequest = new DeleteRequest(request);
deleteRequest.index(PipelineStore.INDEX);
deleteRequest.type(PipelineStore.TYPE);
deleteRequest.id(request.id());

View File

@ -59,7 +59,7 @@ public class PutPipelineTransportAction extends HandledTransportAction<PutPipeli
return;
}
IndexRequest indexRequest = new IndexRequest();
IndexRequest indexRequest = new IndexRequest(request);
indexRequest.index(PipelineStore.INDEX);
indexRequest.type(PipelineStore.TYPE);
indexRequest.id(request.id());