Remove stale comment about setting routing before parent
Order does not matter anymore since we merged #15371
This commit is contained in:
parent
576e698613
commit
578853f264
|
@ -432,7 +432,6 @@ public class BulkRequest extends ActionRequest implements CompositeIndicesReques
|
|||
}
|
||||
line++;
|
||||
|
||||
// order is important, we set parent after routing, so routing will be set to parent if not set explicitly
|
||||
// we use internalAdd so we don't fork here, this allows us not to copy over the big byte array to small chunks
|
||||
// of index request.
|
||||
if ("index".equals(action)) {
|
||||
|
|
|
@ -44,7 +44,7 @@ public class RestDeleteAction extends BaseRestHandler {
|
|||
public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {
|
||||
DeleteRequest deleteRequest = new DeleteRequest(request.param("index"), request.param("type"), request.param("id"));
|
||||
deleteRequest.routing(request.param("routing"));
|
||||
deleteRequest.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
|
||||
deleteRequest.parent(request.param("parent"));
|
||||
deleteRequest.timeout(request.paramAsTime("timeout", DeleteRequest.DEFAULT_TIMEOUT));
|
||||
deleteRequest.setRefreshPolicy(request.param("refresh"));
|
||||
deleteRequest.version(RestActions.parseVersion(request));
|
||||
|
|
|
@ -53,7 +53,7 @@ public class RestGetAction extends BaseRestHandler {
|
|||
final GetRequest getRequest = new GetRequest(request.param("index"), request.param("type"), request.param("id"));
|
||||
getRequest.operationThreaded(true);
|
||||
getRequest.refresh(request.paramAsBoolean("refresh", getRequest.refresh()));
|
||||
getRequest.routing(request.param("routing")); // order is important, set it after routing, so it will set the routing
|
||||
getRequest.routing(request.param("routing"));
|
||||
getRequest.parent(request.param("parent"));
|
||||
getRequest.preference(request.param("preference"));
|
||||
getRequest.realtime(request.paramAsBoolean("realtime", getRequest.realtime()));
|
||||
|
|
|
@ -62,7 +62,7 @@ public class RestIndexAction extends BaseRestHandler {
|
|||
public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {
|
||||
IndexRequest indexRequest = new IndexRequest(request.param("index"), request.param("type"), request.param("id"));
|
||||
indexRequest.routing(request.param("routing"));
|
||||
indexRequest.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
|
||||
indexRequest.parent(request.param("parent"));
|
||||
indexRequest.setPipeline(request.param("pipeline"));
|
||||
indexRequest.source(request.content(), request.getXContentType());
|
||||
indexRequest.timeout(request.paramAsTime("timeout", IndexRequest.DEFAULT_TIMEOUT));
|
||||
|
|
|
@ -83,7 +83,7 @@ public class RestUpdateAction extends BaseRestHandler {
|
|||
IndexRequest upsertRequest = updateRequest.upsertRequest();
|
||||
if (upsertRequest != null) {
|
||||
upsertRequest.routing(request.param("routing"));
|
||||
upsertRequest.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
|
||||
upsertRequest.parent(request.param("parent"));
|
||||
upsertRequest.version(RestActions.parseVersion(request));
|
||||
upsertRequest.versionType(VersionType.fromString(request.param("version_type"), upsertRequest.versionType()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue