exportRequest.source(querySource, false);
}
}
}
exportRequest.routing(request.param("routing"));
exportRequest.types(splitTypes(request.param("type")));
exportRequest.preference(request.param("preference", "_primary"));
} catch (Exception e) {
try {
XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
channel.sendResponse(new XContentRestResponse(request, BAD_REQUEST, builder.startObject().field("error", e.getMessage()).endObject()));