Internal: make sure that original headers are used when executing search as part of put warmer
Closes #7711
This commit is contained in:
parent
ec5ceecb97
commit
8cf922bf9e
|
@ -21,6 +21,7 @@ package org.elasticsearch.action.admin.indices.warmer.put;
|
|||
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.TransportSearchAction;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
|
@ -85,7 +86,8 @@ public class TransportPutWarmerAction extends TransportMasterNodeOperationAction
|
|||
@Override
|
||||
protected void masterOperation(final PutWarmerRequest request, final ClusterState state, final ActionListener<PutWarmerResponse> listener) throws ElasticsearchException {
|
||||
// first execute the search request, see that its ok...
|
||||
searchAction.execute(request.searchRequest(), new ActionListener<SearchResponse>() {
|
||||
SearchRequest searchRequest = new SearchRequest(request.searchRequest(), request);
|
||||
searchAction.execute(searchRequest, new ActionListener<SearchResponse>() {
|
||||
@Override
|
||||
public void onResponse(SearchResponse searchResponse) {
|
||||
if (searchResponse.getFailedShards() > 0) {
|
||||
|
|
Loading…
Reference in New Issue